home *** CD-ROM | disk | FTP | other *** search
/ Merciful 1 / Merciful - Disc 1.iso / software / l / lsd_sprint_docs_disks / lsdsprintdoc'sdisk05.dms / in.adf / TrueBASIC.doc.pp / TrueBASIC.doc
Encoding:
Text File  |  1990-09-07  |  72.5 KB  |  2,899 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8. T R U E   B A S I C
  9.  
  10. The Structured Language System For The Future
  11.  
  12.  
  13.  
  14.  
  15. INSTRUCTIONS 
  16.  
  17. COMMODORE AMIGA 512K VERSION 1
  18.  
  19. PRINTED BY COL (NOVA U.K. 1988).
  20.             
  21.  
  22.  
  23.  
  24. CREDITS
  25. Amiga A500
  26. Pye Studiocolour TV
  27. Amstrad DMP2000 Printer
  28. Cumana External Drive
  29. Wordperfect V4.1
  30. Nescafe Coffee
  31. Benson & Hedges
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38. These instructions have been taken from the two manuals that
  39. come with the True BASIC program disk.  All essential details have
  40. been included.  For a clearer idea of how some of the commands
  41. operate please examine the demo basic programs on the system
  42. disk, as these have all been taken from the original manuals and
  43. were used to accompany the text.
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55. WRITING PROGRAMS
  56.  
  57. The LET statement assignes values to variables.  The values may be
  58. written as constants, variables, or expressions.  Unlike some other
  59. BASICs, LET is a mandatory keyword in True BASIC.
  60. LET statements have the form:
  61.  
  62.     LET variable = expression
  63.  
  64.  
  65. The Print statement displays the results of a program on your
  66. screen.  You can print constants, variables, and expressions.
  67. PRINT statements have the form:
  68.  
  69.     PRINT expression1, expression2
  70.  
  71. The last statement in each True BASIC program must be an END
  72. statement.  The END statement is simply:
  73.  
  74.     END
  75.  
  76. Program Listing "MPG"
  77.     LET miles = 320
  78.     LET gallons = 14.3
  79.     PRINT miles, gallons, miles/gallons
  80.     END
  81.  
  82. Constants are quantities whose values cannot change.  Constants
  83. may be whole numbers or decimals.  True BASIC does not allow
  84. commas or spaces inside constants.
  85.  
  86.  
  87. Variables are quantities whose values may change.  Variable names
  88. may be up to 31 characters long.  Names must begin with a letter,
  89. but subsequent characters can be letters, digits, or the underscore
  90. character.
  91.  
  92.  
  93. Expressions may be any combination of variables, constants, and
  94. operators.  In True BASIC, multiplication and division have higher
  95. priority then addition and subtraction.  Exponentiation has highest
  96. priority.
  97.  
  98.  
  99. MODIFYING PROGRAMS
  100.  
  101.  
  102. Choose Show Output from the Windows menu to activate the Output
  103. Window.
  104.  
  105. You can scroll a line horizontally by clicking at the very end of
  106. that line, or by using the cursor keys.
  107.  
  108. The Tab key moves the insertion point to the next word on the current line.  If there isn`t one, it moves underneath the next word
  109. on the previous line.
  110.  
  111. You can select text by dragging, or you can select a word by
  112. double-clicking and an entire line by triple-clicking.
  113. You can delete selected text by choosing Cut from the Edit menu,
  114. by pressing Command-X, or by pressing backspace or del.
  115.  
  116. An exclamation point signals the beginning of a comment in True
  117. BASIC.  Comments can occupy whole lines, or they may be on the
  118. same line as an executable statement.
  119.  
  120. The INPUT statement allows you to enter variables values from the
  121. keyboard while the program is running.  INPUT statements have the
  122. form:
  123.  
  124.     INPUT variable1, variable2, ...
  125.  
  126. True BASIC displays error messages in the bar at the bottom of the
  127. source window, and simultaneously moves the insertion point to the
  128. line which contains the error.
  129.  
  130. The SAVE command saves your program on the disk under it`s
  131. current name.  The SAVE AS command also saves your current
  132. program on the disk, but asks you to provide a new name for it.
  133.  
  134. The UNSAVE command deletes a file from the disk.  Give the
  135. UNSAVE command by choosing Unsave from the Project menu.
  136.  
  137.  
  138. ELEMENTARY STRINGS
  139.  
  140. True BASIC uses "strings" to represent text and other items which
  141. do not necessarily have numeric values.  A string constant is any
  142. sequence of characters enclosed in double quotes.  The characters
  143. in the string may include numbers, letters, punctuation marks, or
  144. other special characters.
  145.  
  146. String variables are names for string values.  The names of string
  147. variables must end in a dollar sign ($) to distinguish them from
  148. numeric variable names.
  149.  
  150. When a PRINT statement has more than one item on it, True BASIC
  151. uses print zones, or columns, 16 characters wide, if the items are
  152. separated by commas.  If the items are separated by semicolons,
  153. True BASIC displays strings with no leading or trailing spaces, and
  154. numbers with a space on each side.
  155.  
  156. INPUT statements can include a prompt, and can process more than
  157. one item.  The formats are:
  158.  
  159.     INPUT variable
  160.     INPUT variable1, variable2, ...
  161.     INPUT PROMPT expression$: variable1, variable2, ...
  162. The command NEW tells True BASIC to clear the editing window
  163. (and memory) to make room for a new program.
  164.  
  165.  
  166. LINE INPUT statements allow you to enter any kind of reply, even
  167. nothing.  They have the form:
  168.  
  169.     LINE INPUT variable$
  170.  
  171.  
  172. LOOPS AND PRINTERS
  173.  
  174. The FOR-NEXT loop is a True BASIC structure that allows you to
  175. repeat a block of statements a specified number of times.  The loop
  176. is governed by an index variable, whose value changes each time
  177. the loop is executed.  The FOR statement defines the starting value
  178. and ending value of the index variable.  The NEXT statement
  179. indicates the end of the loop structure.
  180.  
  181.     FOR variable = first TO last
  182.     - - - 
  183.     - - -   block of statements
  184.     - - -
  185.     NEXT variable
  186.  
  187. If no step is given in the FOR statement, the index variable is
  188. incremented by one each time the loop is repeated.  By including a
  189. step size in the FOR statement, you can choose other increments
  190. for the index variable.
  191.  
  192.     FOR variable = first TO last STEP size
  193.     - - -
  194.     - - -   block of statements
  195.     - - -
  196.     NEXT variable
  197.  
  198. Example Program
  199. ! Square roots.
  200. !
  201. PRINT "Number", "Square Root"     ! Print labels
  202. PRINT                             ! Leave blank line
  203. FOR number = 0 to 1 step .1       ! Go from 0 to 1 in small steps
  204.    PRINT number, Sqr(number)      ! Print number and square root
  205. NEXT number
  206. END
  207.  
  208. You can even make the value of the index variable decrease each
  209. time the loop is executed by specifying a negative step size.
  210.  
  211. True BASIC has several built-in functions which take input values
  212. from the program that uses them and returns a single value to the
  213. program.  The input values, and the value returned, may be either
  214. string or numeric.
  215.  
  216. The block of statements within a loop may include any True BASIC
  217. statement, even another control structure.
  218.  
  219. To use your printer, first open a channel to the printer.  Then use
  220. this channel in PRINT statements.
  221.  
  222.     OPEN #expression: PRINTER
  223.     PRINT #expression: expression, expression, ...
  224.     PRINT #expression: expression; expression; ...
  225.  
  226. Example Program
  227. ! Print pattern of x's.
  228. !
  229. FOR row = 1 to 6
  230.  
  231.       FOR xcount = 1 to row
  232.          PRINT "x";
  233.       NEXT xcount
  234.  
  235.    PRINT
  236. NEXT row
  237. END
  238.  
  239.  
  240.  
  241.  
  242. IF-THEN, RANDOMIZE AND STOP
  243.  
  244. The IF-THEN structure allows you to modify the flow of control in
  245. a program by telling True BASIC to execute a statement or block
  246. of statements only if a condition is true.  If only one statement is
  247. to be executed when the condition is true, you can write the entire
  248. IF-THEN structure on one line
  249.  
  250.     IF condition THEN statement
  251.  
  252. IF-THEN structures use "comparisons" to make their decisions. 
  253. Comaparisons chack values against other values by useing relational
  254. operators.  True BASIC`s relational operators are:
  255.  
  256.     Operator        Meaning
  257.     =            equal to
  258.     <> or ><        not equal to
  259.     <            less then
  260.     <= or =<        less than or equal to
  261.     >            greater than
  262.     => or >=        greater then or equel to
  263.  
  264. These operators work on all combinations of constants, variables,
  265. and expressions.
  266.  
  267. To execute more then one statement if the condition is true, you
  268. need to use a multiple-line IF-THEN structure.  You must use an
  269. END IF statement to signal the end of the structure.
  270.     IF condition THEN
  271.     - - -
  272.     - - -   block of statements
  273.     - - -
  274.     END IF
  275.  
  276. By using and ELSE statement, you can specify what actions to take
  277. if the condition is false.
  278.  
  279.     IF condition THEN statement1 ELSE statement2
  280.  
  281. In a multiple-line structure, the ELSE statement must be on a line
  282. all by itself.  The statements between the IF-THEN statement and
  283. the ELSE statement will be executed if the condition is true, and
  284. the statements between the ELSE statement and the END IF
  285. statement will be executed if the condition is false.
  286.  
  287.     IF condition THEN
  288.     - - -
  289.     - - -   block of statements
  290.     - - -
  291.     ELSE
  292.     - - -
  293.     - - -   block of statements
  294.     - - -
  295.     END IF
  296.  
  297. The RANDOMIZE statement scrambles the sequence of random
  298. numbers returned by the Rnd function.
  299.  
  300. The STOP statement stops a running program.
  301.  
  302. Example Program
  303. ! Flip a coin five times.
  304. !
  305. FOR toss = 1 to 5
  306.     IF Rnd<.5 then PRINT "Heads, you win"
  307. NEXT toss
  308.  
  309. END
  310.  
  311. Example Program
  312. ! Program to play a guessing game.
  313. !
  314. RANDOMIZE
  315. LET answer = Int(Rnd*6) + 1      ! Choose number from 1 to 6
  316.  
  317. PRINT "I'm thinking of a number from 1 to 6."
  318. PRINT "You have 3 chances to guess it."
  319. PRINT
  320.  
  321. FOR chance = 1 to 3
  322.     PRINT "Enter your guess";      ! Ask for number
  323.     INPUT guess
  324.     IF guess = answer THEN
  325.        PRINT "Correct!!!"
  326.        STOP                        ! Stop here, you guessed it
  327.     END IF
  328. NEXT chance
  329.  
  330. PRINT
  331. PRINT "The number was"; answer
  332. END
  333.  
  334.  
  335. Example Program
  336. ! Program to play a guessing game.
  337. !
  338. RANDOMIZE
  339. LET answer = Int(Rnd*6) + 1       ! From 1 to 6
  340.  
  341. PRINT "I'm thinking of a number from 1 to 6."
  342. PRINT "You have 3 chances to guess it."
  343. PRINT
  344.  
  345. FOR chance = 1 TO 3
  346.    PRINT "Enter your guess";     ! Ask for number
  347.    INPUT guess                   ! Get a guess
  348.  
  349.    IF guess < 1 THEN             ! Check it out
  350.       PRINT "Must be at least 1."
  351.    ELSE
  352.       IF guess > 6 then
  353.          PRINT "Can't be more than 6."
  354.       ELSE
  355.          IF guess < answer then
  356.             PRINT "Too low."
  357.          ELSE
  358.             IF guess > answer then
  359.                PRINT "Too high."
  360.             ELSE                 ! Must be right
  361.                PRINT "Correct!!!"
  362.                STOP
  363.             END IF
  364.          END IF
  365.       END IF
  366.    END IF
  367. NEXT chance
  368.  
  369. PRINT "The number was"; answer; "."
  370. END
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378. DO LOOPS
  379.  
  380. A DO loop lets you execute blocks of statements repeatedly.  DO
  381. loops differ from FOR-NEXT loops in that you don`t specify ahead
  382. of time just how many times the statements inside the loop will be
  383. repeated.  Instead, the number of times depends on the result of
  384. logical comparisons made while the program is running.
  385.  
  386. You can specify when the DO loop stops by a condition in either
  387. the DO statement at the beginning of the loop, the LOOP
  388. statement at the end of the loop, or both.  You can specify that
  389. the loop will be repeated WHILE a certain condition remains true,
  390. or UNTIL a certain condition becomes true.
  391.  
  392.     DO UNTIL condition
  393.     - - -
  394.     - - -   block of statements
  395.     - - -
  396.     LOOP
  397.  
  398.     DO WHILE condition
  399.     - - -
  400.     - - -   block of statements
  401.     - - -
  402.     LOOP
  403.  
  404.     DO
  405.     - - -
  406.     - - -   block of statements
  407.     - - -
  408.     LOOP UNTIL condition
  409.  
  410.     DO
  411.     - - -
  412.     - - -   block of statements
  413.     - - -
  414.     LOOP WHILE condition
  415.  
  416. The rules for conditions in DO loops are the same as in IF-THEN
  417. statements: you can use constants, variables, and expressions with
  418. relational operators.
  419.  
  420. You can create combinations of conditions with the logical
  421. operators AND, OR, and NOT.
  422.  
  423. Example Program
  424. ! Program to compute interest on a bank account.
  425. ! Stop when the money has doubled.
  426. !
  427. LET money = 10000                 ! Start with $10,000
  428. LET original = money              ! Remember original amount
  429.  
  430. LET interest = 8.5/100            ! Interest is 8.5%
  431.  
  432. DO until money >= 2 * original    ! Loop until money doubles
  433.  
  434.    PRINT years, money             ! Print year and money
  435.    LET years = years + 1          ! Keep track of how long
  436.    LET money = money + (interest * money)   ! Add in interest
  437.  
  438. LOOP
  439. PRINT "In"; years ; "years, you'll have $"; money
  440. END
  441.  
  442.  
  443. STORING DATA VALUES
  444.  
  445. DATA statements store values that can be assigned to variables. 
  446. Their format is:
  447.  
  448.     DATA item1, item2, ...
  449.  
  450. READ statements assign data values to variables.  Their format is:
  451.  
  452.     READ variable1, variable2, ...
  453.  
  454. The variables in a READ statement may be numeric, string, or an
  455. assortment of the two.  True BASIC will give you an error message
  456. if you try to read a non-numeric data value into a numeric
  457. variable, but will not if you read a number into a string variable.
  458.  
  459. You can use True BASIC`s built-in conditions, MORE DATA and
  460. END DATA, in a DO loop to see whether there are any more data
  461. to be read.
  462.  
  463. The RESTORE statement restores all your program`s data.  The
  464. next READ statement will read the first item from the list of data
  465. statements.
  466.  
  467. Example Program
  468. ! Trivia quiz.
  469. !
  470. READ num_quest                    ! Number of questions
  471.  
  472. FOR i = 1 to num_quest            ! Read all questions
  473.  
  474.     READ question$, answer$       
  475.  
  476.     PRINT question$;
  477.     LINE INPUT reply$             ! Get user's guess
  478.  
  479.     IF reply$ = answer$ THEN      ! If correct...
  480.        LET right = right + 1      ! Count right replies
  481.        PRINT "Correct."           ! And say bravo
  482.     ELSE
  483.        PRINT "No, the correct answer is "; answer$; "."
  484.     END IF
  485.  
  486. NEXT i
  487.  
  488. PRINT "You got"; 100 * right/num_quest; "% right."
  489.  
  490. DATA 5
  491.  
  492. DATA What is the capital of Austria, Vienna
  493. DATA What year did Franklin Pierce take office, 1853
  494. DATA "What is the capital of Manitoba, Canada", Winnipeg
  495. DATA "How many years, on average, does a baboon live", 20
  496. DATA How about a gray squirrel, 5
  497.  
  498. END
  499.  
  500.  
  501. INTRODUCTION TO GRAPHICS
  502.  
  503. The PLOT statement draws points and lines on your screen.  You
  504. describe the points in terms of coordinates, which are pairs of
  505. numbers.  Each pair of numbers defines a particular location on the
  506. screen.  PLOT statements have the forms:
  507.  
  508.     PLOT x,y
  509.     PLOT x,y,;
  510.     PLOT x1,y1; x2,y2; ...
  511.  
  512. The first draws a single point.  The semicolons in the second and
  513. third forms tell True BASIC to "leave the beam on" between points,
  514. thereby drawing lines.
  515.  
  516. You can make a program stop at any time during its execution by
  517. choosing Stop from the Run menu, or pressing Command-period.
  518.  
  519.  
  520. The SET WINDOW statement lets you define the boundaries of your
  521. screen in terms of your own coordinates.
  522.  
  523.     SET WINDOW left, right, bottom, top
  524.  
  525. Any points, lines, or text outside those boundaries won`t be visible.
  526.  
  527. You can use the PLOT TEXT statement to add text to your graphic
  528. output:
  529.  
  530.     PLOT TEXT, AT  x,y: "label"
  531.  
  532. The CLEAR statement clears the output window (or full screen). 
  533. It`s form is simply:
  534.  
  535.     CLEAR
  536.  
  537. The PAUSE statement suspends program execution for a specified
  538. number of seconds:
  539.  
  540.     PAUSE seconds
  541.  
  542. You can also "freeze" your program by choosing Pause from the
  543. Run Menu, or by pressing Command-W.  A program suspended in
  544. this manner will resume as soon as you click or press a key.
  545.  
  546. True BASIC normally uses radians when it calculates angles, sines,
  547. cosines, etc.  To use degrees instead, add an OPTION statement to
  548. your program:
  549.  
  550.     OPTION ANGLE DEGREES
  551.  
  552. The OPTION statement should precede any executable statement
  553. which would otherwise use radians.
  554.  
  555. Example Program
  556. ! Plot random points.
  557. !
  558. DO
  559.    LET x = Rnd        ! Pick two random numbers
  560.    LET y = Rnd
  561.    PLOT x,y           ! Plot a point there
  562. LOOP
  563.  
  564. END
  565.  
  566. Example program
  567. ! Plot number of cars sold from 1900 to 1980.
  568. !
  569. SET WINDOW 1900, 1980, 0, 10e6
  570.  
  571. FOR year = 1900 to 1980 step 10      ! Years by decades
  572.     READ cars                        ! Read number of cars
  573.     PLOT year, cars;                 ! Plot to this point
  574. NEXT year
  575.  
  576. ! Car production data.
  577.  
  578. DATA 4190, 187e3, 2.2e6, 3.3e6, 4.4e6, 8.0e6, 7.8e6
  579. DATA 8.2e6, 8.0e6
  580. END
  581.  
  582.  
  583. Example Program
  584. ! Plot number of cars sold from 1900 to 1980.
  585. !
  586. SET WINDOW 1900, 1980, 0, 10e6
  587.  
  588. FOR year = 1900 to 1980 step 10   ! Years by decades
  589.     READ cars                     ! Read number of cars
  590.     PLOT year, cars;              ! Plot to this point
  591. NEXT year
  592. PLOT
  593.  
  594. SET WINDOW 1900, 1980, 0, 250e6
  595. FOR year = 1900 to 1980 step 10   ! Years by decades
  596.     READ pop                      ! Read population
  597.     PLOT year, pop;
  598. NEXT year
  599.  
  600. ! Car production data.
  601.  
  602. DATA 4190, 187e3, 2.2e6, 3.3e6, 4.4e6, 8.0e6, 7.8e6
  603. DATA 8.2e6, 8.0e6
  604.  
  605. ! Population data.
  606.  
  607. DATA 76e6, 92e6, 105.7e6, 122.8e6, 131.7e6
  608. DATA 150.7e6, 179.3e6, 203.3e6, 226.5e6
  609. END
  610.  
  611.  
  612. Example Program
  613. ! Lissajous experiment
  614. !
  615. SET WINDOW -1, 1, -1, 1
  616. DO
  617.     PRINT "X multiplier, Y multiplier";
  618.     INPUT xmult, ymult
  619.     CLEAR
  620.  
  621.     FOR i = 0 to 2*pi STEP pi/100    ! Draw the figure
  622.         PLOT sin(xmult*i), cos(ymult*i);
  623.     NEXT i
  624.  
  625.     PLOT                   ! Turn off the beam
  626.     PAUSE 3                ! Wait 3 seconds
  627.     CLEAR                  ! Then clear the screen
  628. LOOP
  629. END
  630.  
  631. ADVANCED GRAPHICS
  632.  
  633. True BASIC has a family of graphics statements, the BOX
  634. statement, which performs fast operations on rectangular areas of
  635. the screen:
  636.  
  637.     BOX AREA left, right, bottom, top
  638.     BOX CIRCLE left, right, bottom, top
  639.     or
  640.     BOX ELLIPSE left, right, bottom, top
  641.     BOX CLEAR left, right, bottom, top
  642.     BOX KEEP left, right, bottom, top IN variable$
  643.     BOX LINES left, right, bottom, top
  644.     BOX SHOW variable$ AT left, bottom
  645.     BOX SHOW variable$ AT left, bottom USING "and"
  646.     BOX SHOW variable$ AT left, bottom USING "or"
  647.     BOX SHOW variable$ AT left, bottom USING "xor"
  648. The SET COLOR statement sets the foreground colour for all
  649. graphic ouput.  SET COLOR can be used with either a number or a
  650. name.  The Workbench screen has three foreground colours which
  651. are controlled by the Preferences tool.
  652.  
  653. The FLOOD statement fills a shape with the current colour.  It`s
  654. form is:
  655.  
  656.     FLOOD x, y
  657.  
  658. The SET BACK statement changes the background colour.  It uses
  659. the same colours as SET COLOR.
  660.  
  661. The SET COLOR MIX statement changes the shade of some colour
  662. number.  You must specify the colour number to change, and the
  663. new settings for the red, green, and blue colour guns.
  664.  
  665. The Amiga`s "HIGH 16" mode provides high-resolution, full screen
  666. graphics with 16 colours.
  667.  
  668.     Name            Number in HIGH16 mode
  669.     Backgound        0
  670.     White        1
  671.     Blue            2
  672.     Red            3
  673.     Yellow        4
  674.     Black        5
  675.     Green        6
  676.     Cyan            7
  677.     magenta        11
  678.     Brown        13
  679.  
  680. True BASIC lets you specify colours by name, as well as by
  681. number.
  682.  
  683. True BASIC uses the GET POINT and GET MOUSE statements for
  684. graphic input:
  685.  
  686.     GET POINT x, y
  687.     GET MOUSE x, y, state
  688.  
  689. GET POINT returns the X- and Y-coordinates of the point where
  690. you click.  GET MOUSE returns the current coordinates and state
  691. of the mouse.  The mouse states are:
  692.  
  693.     Number    State
  694.     0        Button up
  695.     1        Button down
  696.     2        Button clicked
  697.     3        Button released
  698.  
  699. True BASIC uses channel numbers to identify a particular source
  700. for input of destination for output.  For example, to specify a
  701. separate window for graphic output, you must first open a channel to that portion of your screen.  This OPEN statement has the form:
  702.  
  703.     OPEN #expr: SCREEN left, right, bottom, top
  704.  
  705. You may have as many as ten channels open at a time, but only
  706. one window is active.  All output goes to the active window.  To
  707. make a window active, use:
  708.  
  709.     WINDOW #expr
  710.  
  711.  
  712. Example Program
  713. ! Draw a box.
  714. !
  715. SET WINDOW -14, 14, -10, 10     ! 0,0 is center of window
  716.  
  717. BOX LINES -5, 5, -5, 5          ! 5*2 is length of each side
  718.  
  719. END
  720.  
  721.  
  722. Example Program
  723. ! Draw a circle picture.
  724. !
  725. PICTURE Circle(sides)
  726.  
  727.     FOR i = 0 to sides
  728.        LET u = (i*2*Pi)/sides       ! Find next angle
  729.        PLOT Cos(u), Sin(u);         ! Plot next segment
  730.     NEXT i
  731.     PLOT                            ! Turn off beam
  732.  
  733. END PICTURE
  734.  
  735. SET WINDOW -15, 15, -10, 10         ! Set the window
  736.  
  737. FOR j = 1 to 30                     ! Draw a bunch of circles
  738.     DRAW Circle(j) with Scale(j/3)  ! Bigger and better
  739. NEXT j
  740. END
  741.  
  742.  
  743. Example Program
  744. ! A bouncing ball.
  745. !
  746. SET WINDOW 0, 30, 0, 20
  747.  
  748. LET delta = +1                         ! +1 is up, -1 is down
  749. LET x = 15                             ! Start in center
  750. LET y = 10
  751.  
  752. BOX CIRCLE x, x+1, y, y+1              ! Show first ball
  753. FLOOD x+.5, y+.5                       ! Fill in circle
  754. BOX KEEP x, x+1, y, y+1 in ball$       ! Remember that image
  755. DO
  756.     BOX CLEAR x, x+2, y, y+2           ! Erase old ball
  757.     LET y = y + delta                  ! Continue on course
  758.     IF y < 1 OR y > 19 then LET delta = -delta   
  759.  
  760.     BOX SHOW ball$ at x,y               ! Draw new ball
  761.     PAUSE .05                           ! Not too fast
  762. LOOP
  763. END
  764.  
  765.  
  766. Example Program
  767. ! Program to illustrate use of "xor".
  768. !
  769. SET window 0, 10, 0, 10
  770. BOX AREA 0, 1.5, 0, 1.5           ! Draw a rectangle
  771. BOX KEEP 0, 1.5, 0, 1.5 in box$   ! and keep it
  772. BOX CLEAR 0, 1.5, 0, 1.5
  773.  
  774. FOR i = 1 to 8                    ! Show overlapping boxes
  775.     BOX SHOW box$ at i, i using "xor"
  776. NEXT i
  777. END
  778.  
  779.  
  780. Example Program
  781. !  Show the Amiga's "HIGH16" mode.
  782. !
  783. SET mode "HIGH16"
  784. SET window 0, 16, 0, 1
  785.  
  786. FOR x = 0 to 15
  787.     SET color x
  788.     BOX AREA x, x+1, 0, 1
  789. NEXT x
  790. END
  791.  
  792.  
  793. Example Program
  794. ! Draw circles and ellipses.
  795. !
  796. DO
  797.    GET POINT x1, y1             ! Choose one point
  798.    GET POINT x2, y2             ! Choose another point
  799.    BOX CIRCLE x1, x2, y1, y2    ! Draw circle
  800. LOOP
  801. END
  802.  
  803.  
  804. MUSIC AND SOUND EFFECTS
  805.  
  806. The PLAY statement lets you play simple melodies on your
  807. computer.  You can specify the notes to be played, the length of
  808. each note, and the tempo of the music.  PLAY statements have the form:
  809.  
  810.     PLAY music$
  811.  
  812. The string expression in the PLAY statement consists of music
  813. codes.  Some of True BASIC`s music codes are:
  814.  
  815.     Code        Meaning
  816.     A to G    Play a note in current octave
  817.     L n        Set the length of subsequent notes
  818.     ML        Play music legato, or smoothly
  819.     MN        Play music normally
  820.     MS        Play music staccato, or briskly
  821.     O n        Set current octave.  Middle C is the first not in   
  822.             octave 5
  823.     R n or P    Rest for length n
  824.     T n      Set the tempo
  825.     # or +    Sharp
  826.     -        Flat
  827.     .        Play dotted note
  828.  
  829. The SOUND statement lets you use your computer`s speaker to
  830. produce sounds of specified frequency and duration:
  831.  
  832.     SOUND frequency, duration
  833.  
  834. The frequency is measured in Hertz (cycles per second) and the
  835. duration in seconds.
  836.  
  837.  
  838. Example Program
  839. ! Plays the beginning of
  840. ! "On Top of Old Smoky".
  841. !
  842. DO while more data
  843.  
  844.    READ music$    ! Get the string representations
  845.    PLAY music$    ! And play the notes
  846.  
  847. LOOP
  848.  
  849. DATA O4 L4 C C E G O5 L2 C. O4 A.
  850. DATA L4 A F G A L1 G
  851. DATA L4 C C E G L2 G. D.
  852. DATA L4 E F E D L2 C.
  853. END
  854.  
  855.  
  856. Example Program
  857. ! Imitate ringing of a telephone.
  858. !
  859. FOR ring = 1 to 8            ! Let ring 8 times
  860.  
  861.     FOR i = 1 to 30          ! Each ring = 30 alternations
  862.         SOUND 600, .03       ! Freq 600 for .03 sec
  863.         SOUND 1500, .03      ! Then 1500 for .03 sec
  864.     NEXT i
  865.  
  866.     PAUSE 2
  867. NEXT ring
  868. END
  869.  
  870. ADVANCED EDITING
  871.  
  872. The Search menu has three commands for finding and changing
  873. words (or numbers, or parts thereof) in your program:
  874.  
  875.  
  876.  
  877.     The Search Menu
  878.     Move to block...    Move the insertion point to specified     
  879.                         line
  880.     Find...            Locate and select specified text
  881.     Change...            Replace specified text with new text
  882.  
  883. You can select lines to be deleted, copied, moved, or edited by
  884. dragging, by triple clicking, and by shift-clicking.  Or you can use
  885. the F4 "Mark" key.
  886.  
  887. The Edit menu has eight commands that let you delete, copy, move
  888. and otherwise edit a block of lines
  889.  
  890.     The Edit Menu
  891.     Cut            Delete selected block
  892.     Copy            Copy selected block onto clipboard
  893.     Paste        Insert contents of clipboard into program
  894.     Keep...        Discard all but selected block
  895.     Include...    Insert specified file into program
  896.     Edit...        Restrict editing to selected block
  897.     Select...        Select specified block
  898.     Select all    Select entire program
  899.  
  900. You may select the lines before you chhose the command, or you
  901. can choose the command first and then type line numbers to
  902. specify the block.
  903.  
  904. To move part of your program from one place to another, first use
  905. Cut, move the insertion point, and then use Paste.
  906.  
  907. Your True BASIC system disk includes four programs that will
  908. change the appearance of your current program.
  909.  
  910.     The Format Menu
  911.     Do Num        Add line numbers
  912.     Du Unnum        Remove line numbers
  913.     Do Renum        Resequence line numbers
  914.     Do Format        Emphasize keywords and indent structures
  915.     Do...        Choose a Do program
  916. Line numbers are completely optional in True BASIC.
  917.  
  918. Pressing the > key when lines are selected moves the selection one
  919. space to the right; pressing the < key moves it to the left.
  920.  
  921. Choose Print from the Project menu to list your current program
  922. on a printer.
  923.  
  924. Choose Show Command from the Windows menu to activate the
  925. Command window.
  926.  
  927. The F2 key will move your insertion point to the command window. 
  928. If you`re already on the command line, pressing F2 will copy the
  929. last thing you typed onto the command line.  press the F1 key to
  930. return to the source window.
  931.  
  932. You can use the command window to debug your program.  To
  933. breakpoint a line, select it and choose Breakpoint from the Run
  934. menu.  When True BASIC executes that line, it will halt your
  935. program.  Use the caommand window to debug the program, then
  936. use the Continue command to resume your program.
  937.  
  938. The Most frequently used editing commands have the following
  939. keyboard shortcuts (Command=right Amiga key):
  940.  
  941.     Name        Shortcut
  942.     Change    Command-E
  943.     Copy        Command-C
  944.     Cut        Command-X
  945.     Find        Command-F
  946.     Paste    Command-P
  947.     Print    Command-L
  948.  
  949. The editing keys are:
  950.  
  951.     Key        Meaning
  952.     F1        Move to source window
  953.     F2        Move to command window
  954.     F3        Overtype
  955.     F4        Mark line
  956.     F5        Move to start of file
  957.     F6        Move to end of file
  958.     F7        Undo changes to line
  959.     F8        Delete word to left
  960.     F9        Delete word to right
  961.     F10        Delete line to right
  962.     ESC        Delete line to left
  963.     Backspace    Delete character to left
  964.     Del        Delete character to right
  965.  
  966.  
  967.  
  968.  
  969.  
  970. ADVANCED DECISION STRUCTURES
  971.  
  972. The IF-TEHN-ELSE IF structure allows more flexibility in branching
  973. than the simple IF-THEN-ELSE structure.  It lets you create
  974. multiple branches based on any logical conditions:
  975.  
  976.     IF condition1 THEN
  977.     - - -
  978.     - - -   block1
  979.     - - -
  980.     ELSE IF condition2 THEN
  981.     - - -
  982.     - - -   block2
  983.     - - -
  984.     ELSE IF condition3 THEN
  985.     - - -
  986.     - - -   block3
  987.     - - -
  988.     ELSE
  989.     - - -
  990.     - - -   blockE
  991.     - - -
  992.     END IF
  993.  
  994. The SELECT CASE structure provide another, often clearer, method
  995. of defining multiple branches.  The form of the SELECT CASE
  996. structure is:
  997.  
  998.     SELECT CASE index
  999.     CASE test1, test2, ...
  1000.     - - -
  1001.     - - -   block of statements
  1002.     - - -
  1003.     CASE test3, test4, ...
  1004.     - - -
  1005.     - - -   block of statements
  1006.     - - -
  1007.     CASE ELSE
  1008.     - - -
  1009.     - - -   block of statements
  1010.     - - -
  1011.     END SELECT
  1012.  
  1013. The tests in a CASE statement may have any of the following
  1014. forms:
  1015.  
  1016.     constant
  1017.     IS operator constant
  1018.     constant TO constant
  1019.  
  1020. The EXIT DO and EXIT FOR statements let you jump out from the
  1021. middle of a loop, rather then executing all of the statements within
  1022. the loop.
  1023.  
  1024. Example Program
  1025. ! Program to play a guessing game.
  1026. !
  1027. RANDOMIZE
  1028. LET answer = Int(Rnd*6) + 1       ! From 1 to 6
  1029.  
  1030. PRINT "I'm thinking of a number from 1 to 6."
  1031. PRINT "You have 3 chances to guess it."
  1032. PRINT
  1033.  
  1034. FOR chance = 1 TO 3
  1035.    PRINT "Enter your guess";     ! Ask for number
  1036.    INPUT guess                   ! Get a guess
  1037.  
  1038.    IF guess < 1 THEN             ! Check it out
  1039.       PRINT "Must be at least 1."
  1040.    ELSE
  1041.       IF guess > 6 then
  1042.          PRINT "Can't be more than 6."
  1043.       ELSE
  1044.          IF guess < answer then
  1045.             PRINT "Too low."
  1046.          ELSE
  1047.             IF guess > answer then
  1048.                PRINT "Too high."
  1049.             ELSE                 ! Must be right
  1050.                PRINT "Correct!!!"
  1051.                STOP
  1052.             END IF
  1053.          END IF
  1054.       END IF
  1055.    END IF
  1056. NEXT chance
  1057.  
  1058. PRINT "The number was"; answer; "."
  1059. END
  1060.  
  1061.  
  1062. Example Program
  1063. ! Craps game.
  1064. !
  1065. RANDOMIZE
  1066.  
  1067. FOR game = 1 to 10                     ! Play 10 games
  1068.  
  1069.   LET die1 = Int(6*Rnd + 1)            ! Roll 1 die
  1070.   LET die2 = Int(6*Rnd + 1)            ! And the other
  1071.   LET dice = die1 + die2               ! Sum of two dice
  1072.  
  1073.   PRINT dice;                          ! Print this roll
  1074.  
  1075.   SELECT CASE dice                     ! Branch on roll
  1076.  
  1077.     CASE 2, 3, 12                      ! dice = 2, 3, or 12
  1078.          PRINT "You lose"
  1079.  
  1080.     CASE 7, 11                         ! dice = 7 or 11
  1081.          PRINT "You win"
  1082.  
  1083.     CASE ELSE                          ! Anything else
  1084.          LET point = dice              ! Remember that roll
  1085.          DO
  1086.            LET die1 = Int(6*Rnd + 1)   ! Roll again
  1087.            LET die2 = Int(6*Rnd + 1)   ! Both dice
  1088.            LET dice = die1 + die2    
  1089.            PRINT dice;                 ! Print this roll
  1090.          LOOP until dice = 7 or dice = point
  1091.  
  1092.          IF dice=point then PRINT "You win" else PRINT "You
  1093. lose"
  1094.     END SELECT
  1095.  
  1096. NEXT game
  1097.  
  1098. END
  1099.  
  1100. MODULAR PROGRAMMING
  1101.  
  1102. Subroutines and functions both provide methods of segmenting your
  1103. True BASIC programs.  A function returns a single numeric or
  1104. string value to the calling program.  A subroutine does not return
  1105. one single value, but can change the values of parameters which
  1106. are passed to it by the calling program.
  1107.  
  1108. A function may be defined by a single line DEF statement, or by a
  1109. block of lines beginning with a DEF statement and ending with an
  1110. END DEF statement.
  1111.  
  1112. A subroutine definition begins with a SUB statement and end with
  1113. and END SUB statement.
  1114.  
  1115. subroutines may have parameters, or values passed to them by the
  1116. calling program.  Parameters may be for the purpose of input to
  1117. the subroutine, or they may be variables whose values are changed
  1118. by the subroutine.
  1119.  
  1120. Functions may also have one or more parameters.  These
  1121. parameters are for input only, since the value of the function itself
  1122. is the only value returned to the calling program.
  1123.  
  1124. Subroutines and functions may be internal or external.  Internal
  1125. subroutines and functions are part of the main program, and come
  1126. before the END statement, while external ones are outside the main
  1127. program and after the END statement.  The primary difference is
  1128. that internal subroutines and functions share variables with the
  1129. rest of the program, while external ones do not.
  1130.  
  1131. External subroutines and functions can be organised into libraries -
  1132.  collections of routines which can be used by any program.
  1133.  
  1134.  
  1135. ARRAYS
  1136.  
  1137. Every array must be named in a DIM statement before it`s used in
  1138. the program.  The DIM statement defines the number of dimensions
  1139. for the array and the maximum number of elements in each
  1140. dimension.
  1141.  
  1142. Each item in an array is called an element.  You refer to specifc
  1143. elements by subscripts, which represent the element`s position in
  1144. the array.  Subscripts must be enclosed in parentheses.
  1145.  
  1146. The subscripts of an array may have any numbers for their upper
  1147. and lower bounds.  For example:
  1148.  
  1149.     DIM a(5), b(-2 TO 2), c(6 TO 10)
  1150. dimensions three arrays, each of which has five elements.
  1151.  
  1152. Arrays may have as many as 255 dimensions on the Amiga.
  1153.  
  1154.  
  1155. Example Program
  1156. ! Inventory for 5 items.
  1157. !
  1158. READ item1$, number1
  1159. READ item2$, number2
  1160. READ item3$, number3
  1161. READ item4$, number4
  1162. READ item5$, number5
  1163.  
  1164. PRINT "You have these items:"
  1165. PRINT item1$, item2$, item3$, item4$, item5$
  1166. PRINT number1, number2, number3, number4, number5
  1167.  
  1168. DATA hammers, 4, umbrellas, 2, wood stoves, 1
  1169. DATA bags of salt, 4, pliers, 2
  1170. END
  1171.  
  1172.  
  1173. Example Program
  1174. !  Draw histogram of projected expenses.
  1175. !
  1176. DIM expense(1980 to 1989)         ! Bounds run from 1980 to 1989
  1177.  
  1178. FOR i = 1980 to 1989              ! Run through those years
  1179.     READ expense(i)               ! Read projected expense
  1180.     IF expense(i) > max_exp then LET max_exp = expense(i)
  1181. NEXT i
  1182.  
  1183. SET window 1980, 1990, 0, 1.1*max_exp  ! Set window
  1184.  
  1185. FOR i = 1980 to 1989                   ! Run through years
  1186.     BOX AREA i, i+.5, 0, expense(i)    ! Draw bars
  1187. NEXT i
  1188. DATA 4000,4500,7000,8700,8900,11400,11200,10100,9800,9900
  1189. END
  1190.  
  1191.  
  1192. Example Program
  1193. ! State capital quiz.
  1194. !
  1195. RANDOMIZE
  1196. DIM state$(50,2)            ! 50 states, 2 items per state
  1197.  
  1198. FOR i = 1 to 50
  1199.     READ state$(i,1)        ! Read state name
  1200.     READ state$(i,2)        ! And capital
  1201. NEXT i
  1202.  
  1203. FOR i = 1 TO 10             ! Ask 10 questions
  1204.  
  1205.     LET n = Int(50*Rnd) + 1 ! Pick a number between 1 and 50
  1206.     PRINT "The capital of "; state$(n,1); " is";
  1207.     LINE INPUT capital$     ! Get the reply
  1208.     IF Lcase$(capital$) = Lcase$(state$(n,2)) THEN    ! Correct?
  1209.        PRINT "RIGHT!"
  1210.     ELSE
  1211.        PRINT "Nope, it's "; state$(n,2); "."
  1212.     END IF
  1213.  
  1214. NEXT i
  1215.  
  1216. DATA Alabama,Montgomery, Alaska, Juneau, Arizona,Phoenix
  1217. DATA Arkansas,Little Rock, California,Sacramento
  1218. DATA Colorado,Denver, Connecticut,Hartford, Delaware,Dover
  1219. DATA Florida,Tallahassee, Georgia,Atlanta, Hawaii,Honolulu
  1220. DATA Idaho,Boise, Illinois,Springfield, Indiana,Indianapolis 
  1221. DATA Iowa,Des Moines, Kansas,Topeka, Kentucky,Frankfort 
  1222. DATA Louisiana,Baton Rouge, Maine,Augusta, Maryland,Annapolis 
  1223. DATA Massachusetts,Boston, Michigan,Lansing
  1224. DATA Minnesota,St. Paul, Mississippi,Jackson
  1225. DATA Missouri,Jefferson City, Montana,Helena
  1226. DATA Nebraska,Lincoln, Nevada,Carson City
  1227. DATA New Hampshire,Concord, New Jersey,Trenton
  1228. DATA New Mexico,Santa Fe, New York,Albany
  1229. DATA North Carolina,Raleigh, North Dakota,Bismarck
  1230. DATA Ohio,Columbus, Oklahoma,Oklahoma City, Oregon,Salem
  1231. DATA Pennsylvania,Harrisburg, Rhode Island,Providence
  1232. DATA South Carolina,Columbia, South Dakota,Pierre
  1233. DATA Tennessee,Nashville, Texas,Austin, Utah,Salt Lake City
  1234. DATA Vermont,Montpelier, Virginia,Richmond, Washington,Olympia
  1235. DATA West Virginia,Charleston, Wisconsin,Madison
  1236. DATA Wyoming,Cheyenne
  1237. END
  1238.  
  1239.  
  1240. THE MAT STATEMENTS
  1241.  
  1242. The MAT statements provide the ability to work with entire arrays
  1243. at once.  Instead of creating a loop to work with each element of
  1244. an array, you can use a single MAT statement.
  1245.  
  1246. MAT READ corresponds to the simple READ statement, and reads
  1247. values from DATA statements into one or more arrays:
  1248.  
  1249.     MAT READ array1, array2, ...
  1250.  
  1251. The MAT PRINT statement prints the values of all the elements in
  1252. an array.  Commas and semicolons work hust as they do in the
  1253. simple PRINT statements:
  1254.  
  1255.     MAT PRINT array1, array2, ...
  1256.     MAT PRINT array1; array 2; ...
  1257.  
  1258. MAT INPUT and MAT LINE INPUT let you enter values for an
  1259. entire array:
  1260.  
  1261.     MAT INPUT array1, array2, ...
  1262.     MAT LINE INPUT array1$, array2$, ...
  1263.     MAT INPUT array(?)
  1264.  
  1265. The (?) subscript lets you input as many elements as you want. 
  1266. True BASIC will redimension the array to be just big enough to
  1267. hold these elements.
  1268.  
  1269. The MAT assigment statement lets you assign a single value to all
  1270. variables in an array, or to assign one array to another:
  1271.  
  1272.     MAT array = constant
  1273.     MAT array1 = array2
  1274.  
  1275. True BASIC`s matrix arithmetic lets you add, subtract, and multiply
  1276. arrays:
  1277.  
  1278.     MAT sum = a + b
  1279.     MAT diff = a - b
  1280.     MAT prod = a * b
  1281.  
  1282. True BASIC follows the normal rules of matrix arithmetic.
  1283.  
  1284.  
  1285. ADVANCED STRINGS
  1286.  
  1287. True BASIC compares string values according to the ASCII code. 
  1288. This follows alphabetical order, except that all uppercase letters
  1289. come before any lowercase letters.
  1290.  
  1291. True BASIC concatenates strings with the ampersand (&) operator.
  1292.  
  1293. True BASIC extracts substrings by giving the starting and ending positions in the string: s$[start:end]. You can also change parts of
  1294. an existing string by using a substring on the left side of a LET
  1295. statement.
  1296.  
  1297. True BASIC includes a number of built-in functions for operating
  1298. with strings.
  1299.  
  1300.  
  1301. Example Program
  1302. ! Program to sort text in a list.
  1303. !
  1304. DIM name$(1)                      ! We'll redim later
  1305.  
  1306. CALL Get_list                     ! Get list of items 
  1307.  
  1308. LET n = Ubound(name$)             ! How many we have
  1309.  
  1310. CALL Sort_list                    ! Sort the list
  1311. MAT PRINT name$                   ! Now print sorted list
  1312.  
  1313. SUB Get_list
  1314.     PRINT "Enter items to be sorted"
  1315.     MAT INPUT name$(?)            ! Redimension to input
  1316. END SUB
  1317.  
  1318. SUB Sort_list
  1319.     FOR i = n to 2 step -1  
  1320.        FOR j = 1 to i-1
  1321.           IF name$(j) > name$(j+1) then CALL Swap
  1322.        NEXT j
  1323.     NEXT i
  1324. END SUB
  1325.  
  1326. SUB Swap
  1327.     LET temp$ = name$(j)          ! Temporary variable
  1328.     LET name$(j) = name$(j+1)
  1329.     LET name$(j+1) = temp$
  1330. END SUB
  1331.  
  1332. END
  1333.  
  1334.  
  1335. Example Program
  1336. ! Haiku creator.
  1337. !
  1338. RANDOMIZE
  1339. DECLARE DEF Pick$
  1340. DIM article$(3), adjective$(15), noun$(12), verb$(15), prep$(4)
  1341.  
  1342. MAT READ article$, adjective$
  1343. MAT READ noun$, verb$, prep$
  1344.  
  1345. LET line$ = Pick$(article$) & " " & Pick$(adjective$)
  1346. LET line$ = line$ & ", " & Pick$(adjective$) & " "
  1347. LET line$ = line$ & Pick$(noun$) & "--"
  1348. PRINT line$
  1349.  
  1350. LET line$ = Pick$(prep$) & " " & Pick$(article$) & " "
  1351. LET line$ = line$ & Pick$(adjective$) & " " & Pick$(noun$)
  1352. PRINT line$
  1353.  
  1354. LET line$ =  Pick$(article$) & " " & Pick$(noun$) & " "
  1355. LET line$ = line$ & Pick$(verb$) & "."
  1356. PRINT line$
  1357.  
  1358. DATA the, a, this
  1359.  
  1360. DATA distant, foggy, wet, black, snowy, spring, sighing
  1361. DATA broken, hidden, cold, ruined, stiff, forgotten
  1362. DATA drowsy, gleaming
  1363.  
  1364. DATA mountain, garden, shack, cloud, bamboo, stone
  1365. DATA wheelbarrow, pine, field, sparrow, pathway, pond
  1366.  
  1367. DATA rings, appears, disappears, remains, dissolves, shows
  1368. DATA huddles, rises up, is still, creaks, sways, is hidden
  1369. DATA seems lost, forgets itself, sleeps
  1370.  
  1371. DATA under, by, within, beneath
  1372. END
  1373. !
  1374. ! Pick$.  Choose an element of an array.
  1375. !
  1376. DEF Pick$(array$())
  1377.  
  1378.     LET n = Int(Rnd * Ubound(array$)) + 1
  1379.     LET Pick$ = array$(n)
  1380.  
  1381. END DEF
  1382.  
  1383.  
  1384. Example Program
  1385. ! Check for palindromes.
  1386. !
  1387. DO
  1388.    PRINT "The phrase";
  1389.    LINE INPUT phrase$                 ! No error-checking
  1390.  
  1391.    IF phrase$ = "" THEN STOP          ! Stop on null string
  1392.  
  1393.    LET reversed$ = ""                 ! Initialize reversed$  
  1394.    FOR i = Len(phrase$) to 1 step -1  ! Go thru backwards
  1395.        LET reversed$ = reversed$ & phrase$[i:i]   ! Getting chars
  1396.    NEXT i
  1397.    PRINT "That's: "; reversed$
  1398.  
  1399.    IF reversed$ = phrase$ THEN        ! Check reversed & original
  1400.       PRINT "It's a palindrome."
  1401.    ELSE
  1402.       PRINT "Not a palindrome."
  1403.    END IF
  1404.    PRINT
  1405. LOOP
  1406. END
  1407.  
  1408. PICTURES
  1409.  
  1410. You can think of pictures in True BASIC as the graphic equivalent
  1411. of subroutines:
  1412.  
  1413.     PICTURE Name (parameter1, parameter2, ...)
  1414.     - - -
  1415.     - - -
  1416.     PLOT ...
  1417.     - - -
  1418.     - - -
  1419.     END PICTURE
  1420.  
  1421. Pictures are called in DRAW statements.
  1422.  
  1423. You can combine various picture transformations to change the size
  1424. of a picture, rotate it, or move the picture to a different location. 
  1425. The available transformations are:
  1426.  
  1427.     Name            Meaning
  1428.     Shift(a, b)    Move(x,y)to(x+a,y+b)
  1429.     Scale(a, b)    Change(x,y)to(x*a,y*b)
  1430.     Scale(a)        Change(x,y)to(x*a,y*a)
  1431.     Rotate(a)        Rotate(x,y) a radians counterclockwise around
  1432.                 origin
  1433.     Shear(a)        Lean verical lines forward (i.e., to the
  1434.                 right) a radians
  1435.  
  1436. Pictures may be internal or external, and may be included in
  1437. libraries.
  1438.  
  1439.  
  1440. Example Program
  1441. ! A picture of a triangle.
  1442. !
  1443. PICTURE Triangle
  1444.     PLOT 0,0; 1,1; 1,0; 0,0    ! A triangle
  1445. END PICTURE
  1446.  
  1447. SET WINDOW 0, 16, 0, 10        ! Set the window
  1448. DRAW Triangle                  ! Draw the triangle
  1449. END
  1450.  
  1451.  
  1452.  
  1453.  
  1454.  
  1455. Example Program
  1456. ! Draws three houses using pictures
  1457. !
  1458. SET WINDOW 0, 10, 0, 10
  1459. OPTION ANGLE degrees
  1460. DRAW House with Scale(1) * Shift(7,6)
  1461. DRAW House with Scale(1.5) * Shift(1.8,4)
  1462. DRAW House with Rotate(45) * Scale(2,1.65) * Shift(6.2,1.8)
  1463. END
  1464.  
  1465. PICTURE House
  1466.     SET COLOR 3
  1467.     PLOT AREA: -1,-1; -1,1; 1,1; 1,-1      ! The house itself
  1468.  
  1469.     SET COLOR 1
  1470.     PLOT area: -1,1; 0,1.5; 1,1                 ! Its roof
  1471.     PLOT area: -1,1; -1,1.4; -.8,1.4; -.8,1     ! and chimney
  1472.  
  1473.     SET COLOR 0
  1474.     PLOT area: -.15,-1; -.15,-.3; .15,-.3; .15,-1    ! A door
  1475.  
  1476.     DRAW Window with Shift(-.5,-.5)             ! and 4 windows
  1477.     DRAW Window with Shift(-.5,.5)
  1478.     DRAW Window with Shift(.5,.5)
  1479.     DRAW Window WITH Shift(.5,-.5)
  1480. END PICTURE
  1481.  
  1482. PICTURE Window
  1483.     SET COLOR 0
  1484.     PLOT AREA: -.1,-.2; -.1,.2; .1,.2; .1,-.2   ! The window
  1485.     SET COLOR 1
  1486.     PLOT -.1,0; .1,0                            ! and its sills
  1487.     PLOT 0,-.2; 0,.2
  1488. END PICTURE
  1489.  
  1490.  
  1491.  
  1492.  
  1493.  
  1494.  
  1495.  
  1496.  
  1497.  
  1498.  
  1499.  
  1500.  
  1501.  
  1502.  
  1503.  
  1504.  
  1505.  
  1506.  
  1507.  
  1508.  
  1509. AMIGA GRAPHICS
  1510.  
  1511. Amiga Modes
  1512.  
  1513. GRAPHICS        Workbench screen, 640 X 200, 4 colours
  1514. LOW2            320 X 200, 2 colours
  1515. LOW4            320 X 200, 4 colours
  1516. LOW 8        320 X 200, 8 colours
  1517. LOW16        320 X 200, 16 colours
  1518. LOW32        320 X 200, 32 colours
  1519. LACELOW2        320 X 400, 2 colours, Interlaced
  1520. LACELOW4        320 X 400, 4 colours, Interlaced
  1521. LACELOW8        320 X 400, 8 colours, Interlaced
  1522. LACELOW16        320 X 400, 16 colours, Interlaced
  1523. LACELOW 32    320 X 400, 32 colours, Interlaced
  1524. HIGH2        640 X 200, 2 colours
  1525. HIGH4        640 X 200, 4 colours
  1526. HIGH8        640 X 200, 8 colours
  1527. HIGH16        640 X 200, 16 colours
  1528. LACEHIGH2        640 X 400, 2 colours, Interlaced
  1529. LACEHIGH4        640 X 400, 4 colours, Interlaced
  1530. LACEHIGH8        640 X 400, 8 colours, Interlaced
  1531. LACEHIGH16    640 X 400, 16 colours, Interlaced
  1532.  
  1533. To switch to a new mode use the SET MODE command.  For
  1534. instance:
  1535.  
  1536.     set mode "high16"
  1537.  
  1538. switches to HIGH16 mode.  If you use a name that True BASIC
  1539. doesn`t recognise, it uses mode GRAPHICS instead.  (That is, it
  1540. uses the full Workbench screen for output.)
  1541. The Amiga clears the screen when you switch modes.
  1542.  
  1543. The SET and ASK statements, for colours, reflect the current
  1544. graphic mode.
  1545. ASK MAX COLOR returns the numbers of foreground colours for
  1546. the current mode.
  1547. SET COLOR changes to a new foreground colour.
  1548. ASK COLOR returns the current foreground colour.
  1549. ASK COLOR MIX returns the actual color levels used by the Amiga.
  1550.  
  1551.  
  1552.  
  1553. LIBRARIES
  1554.  
  1555. Your True BASIC syetem disk includes several library files of
  1556. functions and subroutines that supplement the True BASIC language. 
  1557. Four of the libraries contain mathematical functions; one contains
  1558. subroutines for drawing graphs; and one contains subroutines for
  1559. using menus.
  1560. Your disk also contains a library, AmigaLib*, that lets you get at
  1561. some of the Amiga`s special features.  This library is written in
  1562. True BASIC, C, and assembly language.
  1563. These libraries are all in a directory named "Libs".  You will need
  1564. to add the directory name to your LIBRARY statement when you
  1565. use these libraries - for example:
  1566.  
  1567.     library "Libs/AmigaLib*"
  1568.  
  1569. MATHEMATICAL FUNCTIONS
  1570. The four math libraries are:
  1571.  
  1572. FnhLib    Hyberbolic functions
  1573. FntLib    Trigonometric functions (in radians)
  1574. FntdLib    Trigonometric functions (in degrees)
  1575. FnmLib    Math functions
  1576.  
  1577. Their file names and functions are listed below:
  1578.  
  1579. Library File FnhLib
  1580. Include file    Functions    Explanation
  1581. Fnh            Sinh(a)    Hyperbolic sine of a
  1582.             Cosh(a)    Hyperbolic cosine of a
  1583.             Tanh(a)    Hyperbolic tangent of a
  1584.             Coth(a)    Hyperbolic cotengent of a
  1585.             Sech(a)    Hyberbolic secant of a
  1586.             Csch(a)    Hyperbolic cosecant of a
  1587.             Asinh(a)    Hyperbolic arcsine of a
  1588.             Acosh(a)    Hyperbolic arccosine of a
  1589.             Atanh(a)    Hyperbolic arctangent of a
  1590.             Acoth(a)    Hyperbolic arccotangent of a
  1591.             Asech(a)    Hyperbolic arcsecant of a
  1592.             Acsch(a)    Hyperbolic arccosecant of a
  1593.  
  1594. Library file FntLib
  1595. Fnt            Cot(a)    Cotangent of a
  1596.             Sec(a)    Secant of a
  1597.             Csc(a)    Cosecant of a
  1598.             Asin(a)    Arcsine of a
  1599.             Acos(a)    Arccosine of a
  1600.             Acot(a)    Arcotangent of a
  1601.             Asec(a)    Arcsecant of a
  1602.             Acsc(a)    Arccosecant of a
  1603.  
  1604. Library file FntdLib
  1605. Fntd            Cot(a)    Cotangent of a
  1606.             Sec(a)    Secant of a
  1607.             Csc(a)    Cosecant of a
  1608.             Asin(a)    Arcsine of a
  1609.             Acos(a)    Arccosine of a
  1610.             Acot(a)    Arccotangent of a
  1611.             Asec(a)    Arcsecant of a
  1612.             Acsc(a)    Arccosecant of a
  1613.  
  1614.  
  1615.  
  1616.  
  1617. Libary file FnmLib
  1618. Fnm            Logbase(x,b)    Log of x to the base b
  1619.             Erf(x)        Error function: Erf(x)=
  1620.                         2*Norm1(Sqr(2)*x)
  1621.             Normal(a,b)    Area under the normal curve
  1622.                         from a to b
  1623.             Norm1(x)        Area under the normal curve
  1624.                         from 0 to x
  1625.             Factrl(n)        n factorial
  1626.             Binom(n,j)    Binomial coefficient
  1627.             Binompr(n,j,p) Binomial distribution
  1628.             Poisson (m,j)  Poisson distribution
  1629.  
  1630. The "Include file" listed for each library file contains a LIBRARY
  1631. statement with the appropriate file name, and DECLARE DEF
  1632. statement(s) that declare the appropriate functions.  File Fntd also
  1633. contains an OPTION ANGLE DEGREES statement, so that functions
  1634. in library file FntdLib expect all angles to be measured in degrees.
  1635. To use one of the above libraries in you program, therefore, all
  1636. you have to do is include the corresponding file.  Move your
  1637. insertion point to the first line in your program.  Choose include
  1638. from the Edit menu, select the name of the include file that
  1639. corresponds to the library you want to use, and click the include
  1640. button.  For example to use Library FnhLib, include Fnh.  The
  1641. following statements will be added to your file:
  1642.  
  1643.     library "Libs/FnhLib"
  1644.     declare def Sinh, Cosh, Tanh, Coth, Sech, Csch
  1645.     declare def Asinh, Acosh, Atanh, Acoth, Asech, Acsch
  1646.  
  1647. You can then use any of the twelve hyperbolic functions in your
  1648. programs just as if they were part of the True BASIC language.
  1649.  
  1650. GRAPHICS SUBROUTINES
  1651. The GraphLib library contains several graphic subroutines.  The
  1652. following list gives the form of the CALL statement and an
  1653. explanation of each subroutine.
  1654.  
  1655. CALL Arc(x,y,r,a1,a2)        Draws and arc of the circle with
  1656.                         centre at (x,y) and radius r.
  1657.                         The arc is from a1 to a2, where a1
  1658.                         and a2 are angles in degress.
  1659.  
  1660. CALL Axes                    Draws the X- and Y-axes of your
  1661.                         current window.
  1662.  
  1663. CALL Bars(data,n)            Draws a bar graph of n numbers
  1664.                         stored in the one-dimensional
  1665.                         array data.  Bars sets its own
  1666.                         window.
  1667.  
  1668.  
  1669.  
  1670. CALL Fplot(a,b)            Draws a line graph of function F                         from a to b.  You must define
  1671.                         function F(x) as an external
  1672.                         function.  Fplot sets its own
  1673.                         window.
  1674.  
  1675. CALL Frame                Draws a frame around your current
  1676.                         window.
  1677.  
  1678. CALL Polygon(x1,x2,y1,y2,n)    Draws an n-sided polygon within a
  1679.                         box defined by coordinates
  1680.                         x1,x2,y1, and y2.
  1681.  
  1682. CALL Ticks(a,b)            Draws the X- and Y-axes of your
  1683.                         current window, with tick marks a
  1684.                         units apart on the X-axes and b
  1685.                         units apart on the Y-axes.
  1686.  
  1687. To use any of these subroutines in your program, just add the
  1688. statement:
  1689.  
  1690.     library "Libs/GraphLib"
  1691.  
  1692. at the beginning of your program.
  1693.  
  1694.  
  1695. MENU SUBROUTINES
  1696.  
  1697. Library MenuLib contains five subroutines for using "push button"
  1698. menus.  These menus, unlike the usual "pull down" menus, have all
  1699. items visible on the screen at the same time.  The items look like
  1700. OK and Cancel buttons.
  1701.  
  1702. MenuLib lets you choose the placement of the menu on your
  1703. screen, the number of items in the menu, and the button labels. 
  1704. Menu items must be selected by clicking one of the buttons; the
  1705. subroutines check that the responses are legal.  The menus are
  1706. displayed in a seperate window, #9.  Prompts and choices are
  1707. diplayed in whatever window your program has opened (the
  1708. "working window").
  1709.  
  1710. The five menu subroutines are:
  1711.  
  1712.     Menu_set    Opens the menu window, #9, and sets the
  1713. parameters             for the other menu subroutines.
  1714.  
  1715.     Menu_all    Displays the menu and prompt, gets a choice and
  1716.             diplays it, clears the menu window, and returns to
  1717.             the working window.
  1718.  
  1719.     Menu        Displays the menu and gets a choice.
  1720.  
  1721.     Menu_show    Displays the menu.
  1722.     Menu_ask    Gets a choice.
  1723. Their parameters are explained in detail below.  To use any of the subroutines, add the statement:
  1724.  
  1725.     libary "Libs/MenuLib"
  1726.  
  1727. to your program, before any statements that CALL the subroutines. 
  1728. You should first call the subroutine Menu_set, which opens the
  1729. menu window, #9, and sets the parameters of menu placement,
  1730. number of items, and size of items for the other routines.  After
  1731. calling Menu_set, you can use any of the other four to display the
  1732. menu and process the choice, but Menu_all is the most general. 
  1733. Most applications can be handled by using only Menu_set and
  1734. Menu_all.
  1735.  
  1736. Menu_set requires a CALL statement of the form:
  1737.  
  1738.     CALL Menu_set(where$, c$, maxent, maxlen, menu$, $9)
  1739.  
  1740. The parameters have the following meanings:
  1741.  
  1742. where$    Placement of menu.  where$ may be "top", "bottom",
  1743.         "left", or "right", in upper of lowercase letters.
  1744.  
  1745. c$        Colour for the menu window.
  1746.  
  1747. maxent    Maximeum number of entries in any menu.  maxent
  1748. cannot         be greater than ten.
  1749.  
  1750. maxlen    Maximum length of a menu item,  maxlen cannot be
  1751.         greater then ten.
  1752.  
  1753. menu$    menu$ is a packed variable that is used by all the
  1754.         other menu subroutines.  You should not try to chanhe
  1755.         menu$.
  1756.  
  1757. #9        Window #9 is where the menu will be displayed.
  1758.  
  1759. The CALL statement for subroutine Menu_all has the form:
  1760.  
  1761.     CALL Menu_all (M$, m, prompt$, ans, menu$, #n, #9)
  1762.  
  1763. The parameters are:
  1764.  
  1765. M$        A one dimensional string array containing the menu
  1766.         items.
  1767.  
  1768. m        The number of menu items in thelist M$.  m cannot be
  1769.         greater than the value of maxent given in the call to
  1770.         Menu_set.
  1771.  
  1772. prompt$    The prompt that will be displayed in the working
  1773.         window.
  1774.  
  1775. ans        The menu item chosen (a number from 1 to m)
  1776. menu$    the packed string created by Menu_set.  You should not         try to use menu$.
  1777.  
  1778. #n        The working window opened in your program.  n must be
  1779. a         numeric constant between 1 and 1000.
  1780.  
  1781. #9        The menu window opened by Menu_set.
  1782.  
  1783.  
  1784. The Amiga Library
  1785.  
  1786. Your disk also contains AmigaLib*, a special library of Amiga
  1787. subroutines.  This library is written in a mixture of True BASIC, C,
  1788. and assembly language.  We`ve combined the results into a single,
  1789. compiled library, but your disk also contains the seperate source
  1790. files.
  1791.  
  1792. CALL Say(speech$)
  1793.     Speaks the given speech$ aloud, using the Amiga`s voice
  1794.     synthesizer
  1795.  
  1796. CALL Cycle(color$,inc)
  1797.     Cycles the colour mixes for the active colours on the
  1798.     screen.  The string color$ contains a strangely packed string
  1799. representing the colours to use.  The Rainbow$     function, below,
  1800. gives a rainbow colour cycle.  The     expression inc gives the
  1801. "step" to use when cycling through     the colours: +1 cycles one
  1802. way, -1 cycles the other, and so     forth.
  1803.  
  1804. LET color$=Rainbow$
  1805.     Rainbow$ gives a color$ string suitable for use with the
  1806.     cycle subroutine.  It contains the colours of the rainbow. 
  1807.     Rainbow$ is a True BASIC function: see its source code for a
  1808.     description of the format of color$ string.
  1809.  
  1810. CALL CLI(command$)
  1811.     CLI issues a CLI command command$.  Output produced by
  1812. this     command is normally discarded.  To see the output and
  1813. to     execute commands interactively, give the null string as a  
  1814. command.  This will open a new, independant CLI window.      This
  1815. subroutine causes an exception if the CLI can`t be used     - for
  1816. instance, if the Amiga is running low on memory or if     the
  1817. command program RUN isn`t present in the C: logical     device.
  1818.  
  1819. LET filename$=GetFile$(x,y,type$,button$)
  1820.     GetFile$ presents an Open box on the screen, lets the user
  1821.     select a file name, and returns that file name.  As usual,
  1822.     the user can switch disks and directories while using the
  1823.     Open box.  If the user clicks Cancel, GetFile$ returns a null
  1824. string.  The x and y coordinates give the pixel     location of the
  1825. top left corner of the box.  The Type$ is     included only for
  1826. compatability with GetFile$ on other     brands of computers, it`s
  1827. ignored on the Amiga.  The button$     text replaces "Open" in
  1828. the Box`s button.  It can be up to 7     characters long.
  1829.  
  1830. To use any of these routines, add a library statement to the start
  1831. of your program; add the DECLARE DEF statement only if you
  1832. want to use Rainbow$ or GetFile$ funtions:
  1833.  
  1834.     library "Libs/AmigaLib*"
  1835.     declare def Rainbow$, GetFile$
  1836.  
  1837. The program spirograph shows how to use the Cycle and Rainbow$
  1838. routines.  The program Speackup shows how to use the Say
  1839. subroutine.  Both programs are in the Demos directory.
  1840.  
  1841.  
  1842.  
  1843.  
  1844.  
  1845.  
  1846.  
  1847.  
  1848.  
  1849.  
  1850.  
  1851.  
  1852.  
  1853.  
  1854.  
  1855.  
  1856.  
  1857.  
  1858.  
  1859.  
  1860.  
  1861.  
  1862.  
  1863.  
  1864.  
  1865.  
  1866.  
  1867.  
  1868.  
  1869.  
  1870.  
  1871.  
  1872.  
  1873.  
  1874.  
  1875.  
  1876.  
  1877.  
  1878.  
  1879.  
  1880. TRUE BASIC AMIGA COMMAND LIST
  1881.  
  1882. Syntax for commands:
  1883. block may ba a line number, range of lines, routine name, or selected line(s).
  1884.  
  1885. filename may be any valid filename.
  1886.  
  1887. text may be any word or number in your program, or any
  1888. characters enclosed in "quotes".
  1889.  
  1890. Commands
  1891. Type on Command line in Command window.
  1892.  
  1893. BREAK
  1894. BREAK block
  1895.  
  1896. CHANGE old,new        where old and new are text
  1897. COMPILE
  1898. CONTINUE
  1899. COPY from,to        where from and to are blocks
  1900.  
  1901. DELETE block
  1902. DO filename
  1903. DO FORMAT
  1904. DO NUM
  1905. DO RENUM
  1906. DO UNNUM
  1907.  
  1908. EDIT
  1909. EDIT block
  1910.  
  1911. FILES
  1912.  
  1913. INCLUDE filename
  1914.  
  1915. KEEP block
  1916. KEY
  1917. KEY FROM filename
  1918. KEY TO filename
  1919.  
  1920. LIST
  1921. LIST block
  1922. LOCATE text
  1923.  
  1924. MARK
  1925. MARK block
  1926. MOVE block1,block2
  1927.  
  1928. NEW
  1929.  
  1930. OLD filename
  1931.  
  1932. REPLACE filename
  1933. RUN
  1934.  
  1935. SAVE filename
  1936.  
  1937. TO block
  1938. TRY old,new        where old and new are text
  1939.  
  1940. UNSAVE filename
  1941.  
  1942. Mathematical functions
  1943.  
  1944. Abs(x)
  1945. Divide(x,y,q,r)
  1946. Eps(x)
  1947. Exp(x)
  1948. Int(x)
  1949. Log(x)
  1950. Log2(x)
  1951. Log10(x)
  1952. Max(x,y)
  1953. Maxnum
  1954. Min(x,y)
  1955. Mod(x,y)
  1956. Remainder(x,y)
  1957. Rnd
  1958. Round(x)
  1959. Round(x,n)
  1960. Sgn(x)
  1961. Sqr(x)
  1962. Truncate(x,n)
  1963.  
  1964. Trigonometric functions
  1965.  
  1966. Angle(x,y)
  1967. Atn(x)
  1968. Cos(x)
  1969. Deg(x)
  1970. Pi
  1971. Rad(x)
  1972. Sin(x)
  1973. Tan(x)
  1974.  
  1975. String functions
  1976.  
  1977. Chr$(n)
  1978. Len(a$)
  1979. Lcase$(a$)
  1980. Ltrim$(a$)
  1981. Ord(a$)
  1982. Pos(a$,b$)
  1983. Repeat$(a$,n)
  1984. Rtrim$(a$)
  1985. Str$(n)
  1986. Trim$(a$)
  1987. Ucase$(a$)
  1988. Using$(fmt$,a)
  1989. Val(a$)
  1990.  
  1991. Date and time functions
  1992.  
  1993. Date
  1994. Time
  1995. Date$
  1996. Time$
  1997.  
  1998. Ask statements
  1999.  
  2000. BACK var                #n: ACCESS var$
  2001. COLOR var                #n: FILESIZE var
  2002. COLOR MIX (color) r,g,b    
  2003. CURSOR var$            #n: MARGIN var
  2004. CURSOR line,column        #n: NAME var$
  2005. FREE MEMORY var        #n: ORIGANIZATION var$
  2006. MARGIN var            #n: POINTER var$
  2007. MAX COLOR var            #n: RECORD var
  2008. MAX CURSOR line,column    #n: RECSIZE var
  2009. MODE var$                #n: ZONEWIDTH var
  2010. SCREEN x1,x2,y1,y2
  2011. WINDOW x1,x2,y1,y2
  2012. ZONEWIDTH var
  2013.  
  2014.  
  2015. BOX AREA left,right,bottom,top
  2016. BOX CIRCLE left,right,bottom,top
  2017. BOX CLEAR left,right,bottom,top
  2018. BOX ELLIPSE left,right,bottom,top
  2019. BOX KEEP left,right,bottom top IN var$
  2020. BOX LINES left,right,bottom,top
  2021. BOX SHOW var$ AT left,bottom
  2022. BOX SHOW var$ AT left,bottom USING expr
  2023.  
  2024. CALL subr (expr1,expr2,...)
  2025.  
  2026. CAUSE ERROR expr
  2027. CAUSE ERROR expr,expr$
  2028.  
  2029. CHAIN expr$
  2030. CHAIN expr$,RETURN
  2031. CHAIN expr$ WITH (arg$)
  2032. CHAIN expr$ WITH (arg$), RETURN
  2033.  
  2034. CLEAR
  2035.  
  2036. CLOSE #expr
  2037.  
  2038. DATA item1,item2,...
  2039.  
  2040. DECLARE DEF func1,func2,...
  2041. DEF func(var1,var2,...) = exp
  2042.  
  2043. DEF func(var1,var2,...)
  2044.     ...
  2045.     LET func=expr
  2046.     ...
  2047.     END DEF
  2048.  
  2049. DIM array(bound,bound,...),...
  2050. DIM array(low TO high,low TO high,...),...
  2051.  
  2052. DO WHILE condition
  2053.     ...    WHILE condition
  2054.     ...    UNTIL condition
  2055. LOOP
  2056.  
  2057. DRAW picture
  2058. DRAW picture WITH transform*transform* ...
  2059.  
  2060. END
  2061.  
  2062. ERASE #expr
  2063.  
  2064. EXIT DEF
  2065. EXIT DO
  2066. EXIT FOR
  2067. EXIT HANDLER
  2068. EXIT SUB
  2069.  
  2070. EXTERNAL
  2071.  
  2072. FLOOD x,y
  2073.  
  2074. FOR var = first TO last STEP size
  2075.     ...
  2076.     ...
  2077.     NEXT var
  2078.  
  2079. GET KEY var
  2080. GET MOUSE x,y,state
  2081. GET POINT x,y
  2082.  
  2083. GOSUB line-number
  2084. GOTO line-number
  2085.  
  2086. IF condition THEN statement
  2087. IF condition THEN statement1 ELSE statement2
  2088. IF condition THEN
  2089.     ...
  2090.     ...
  2091.     END IF
  2092. IF condition THEN
  2093.     ...
  2094.     ...
  2095.     ELSE IF condition THEN
  2096.     ...
  2097.     ...
  2098.     ELSE
  2099.     ...
  2100.     ...
  2101.     END IF
  2102. INPUT var1,var2,...
  2103. INPUT PROMPT expr$,var1,var2,...
  2104. LINE INPUT var1$,var2$,...
  2105. LINE INPUT PROMPT expr$,var1$,var2$,...
  2106.     INPUT statements can be used with files.  Add a channel
  2107.     number, such as:
  2108.     INPUT #expr:a$
  2109.     LINE INPUT #expr,PROMPT expr$,var1$,var2$,...
  2110.  
  2111. LET var1,var2,...=expr
  2112. LET var1$(start:end)=expr$
  2113.  
  2114. LIBRARY "filename","filename",...
  2115.  
  2116. MAT array=(expr)
  2117. MAT array=array1+array2
  2118. MAT array=array1-array2
  2119. MAT array=arrat1*array2
  2120. MAT array-Inv(array1)
  2121. MAT array=Trn(array1)
  2122.  
  2123. MAT PLOT AREA: array
  2124. MAT PLOT LINES: array
  2125. MAT PLOT POINTS: array
  2126.     MAT may also precede any INPUT,PRINT,READ, or WRITE
  2127.     statement.  If so, the statement reads/writes arrays rather
  2128.     then ordinary variables.
  2129.  
  2130. ON expr GOSUB line-number,line-number,...
  2131. ON expr GOSUB line-number,line-number,...ELSE line-number
  2132. ON expr GOTO line-number,line-number,...
  2133. ON expr GOTO line-number,line-number,...ELSE line-number
  2134.  
  2135. OPEN #expr:NAME expr$, ACCESS accmode$
  2136.                  , CREATE crtmode$
  2137.                  , ORGANIZATION orgmode$
  2138.                  , RECSIZE recsize
  2139.     accmode$ can be "INPUT", "OUTPUT", "OUTIN"
  2140.     crtmode$ can be "NEW", "OLD", "NEWOLD"
  2141.     ormode$ can be "TEXT", "RECORD", "BYTE"
  2142.  
  2143. OPEN #expr:PRINTER
  2144. OPEN #expr:SCREEN left,right,bottom,top
  2145.  
  2146. OPTION ANGLE DEGREES
  2147. OPTION ANGLE RADIANS
  2148. OPTION BASE constant
  2149.  
  2150. PAUSE expr
  2151.  
  2152. PICTURE Pic(var1,var2,...)
  2153.     ...
  2154.     ...
  2155.     END PICTURE
  2156. PLAY music$
  2157.  
  2158. PLOT x1,y1;x2,y2;...
  2159. PLOT AREA:x1,y1;x2,y2;...
  2160. PLOT LINES:x1,y1;x2,y2;...
  2161. PLOT POINTS:x1,y1;x2,y2;...
  2162. PLOT TEXT,AT x1,y1:expr$
  2163.  
  2164. PRINT expr1,expr2,...
  2165. PRINT expr1;expr2;...
  2166. PRINT USING format$:expr1,expr2,...
  2167.  
  2168. PROGRAM name
  2169. PROGRAM name(var$)
  2170.  
  2171. RANDOMIZE
  2172.  
  2173. READ var1,var2,...
  2174. READ #expr:var1,var2,...
  2175. READ #expr,BYTES expr:var1,var2,...
  2176.  
  2177. REM
  2178.  
  2179. RESET
  2180.  
  2181. RESTORE
  2182.  
  2183. RETURN
  2184.  
  2185. SELECT CASE expr            test may be
  2186.     CASE test1,test2,...
  2187.     ...                    constant
  2188.     ...                    low TO high
  2189.     CASE test3,test4,...    IS op constant
  2190.     ...
  2191.     ...                    op can be <,=,<>, etc
  2192.     CASE ELSE
  2193.     ...
  2194.     ...
  2195.     END SELECT
  2196.  
  2197. Set Statements
  2198.  
  2199. BACK expr                #n:MARGIN expr
  2200. COLOR expr            #n:POINTER BEGIN
  2201. COLOR MIX (color) r,g,b    
  2202. CURSOR expr$            #n:POINTER END
  2203. CURSOR line,column        #n:POINTER NEXT
  2204. MARGIN expr            #n:POINTER SAME
  2205. MODE name$            #n:RECORD expr
  2206. WINDOW x1,x2,y1,y2        #n:RECSIZE expr
  2207. ZONEWIDTH expr            #n:ZONEWIDTH expr
  2208.  
  2209. SOUND freq,time
  2210. STOP
  2211.  
  2212. SUB subr(var1,var2,...)
  2213.     ...
  2214.     ...
  2215.     END SUB
  2216.  
  2217. UNSAVE expr$
  2218.  
  2219. WHEN ERROR IN
  2220.     ...
  2221.     ...
  2222.     USE
  2223.     ...
  2224.     ...
  2225.     END WHEN
  2226.  
  2227. WINDOW #expr
  2228.  
  2229. WRITE #expr:expr1,expr2,...
  2230.  
  2231. Formatting characters for PRINT USING statement and Using$
  2232. function
  2233.  
  2234. +    print number with leading "+" or "-"
  2235. -    print number with leading space or "-"
  2236. $    print number with leading dollar sign
  2237. *    print leading zeros as "*"
  2238. %    print leading zeros as "0"
  2239. #    print leading zeros as spaces
  2240. ,    insert comma here if appropriate
  2241. .    align decimal point here
  2242. ^    exponent field
  2243. <    left justify string
  2244. >    right justift string
  2245.  
  2246.  
  2247.  
  2248.  
  2249.  
  2250.  
  2251.  
  2252.  
  2253.  
  2254.  
  2255.  
  2256.  
  2257.  
  2258.  
  2259.  
  2260.  
  2261. ERROR MESSAGES
  2262.  
  2263. Argument types don`t match.
  2264. Your`e calling a routine with some argumanets, but earlier in your
  2265. program you defined or called the same routine with different
  2266. arguments.  Either you`re giving a different number of arguments in
  2267. the calls, or their types are different - you`re passing strings
  2268. instead of numbers, or vice versa.  Check this call against
  2269. preceding calls, and against the routine`s definition.
  2270.  
  2271. Bad FIND item; try using quotes.
  2272. When you`re trying to find a string which contains a comma or
  2273. double quote marks, you must enclose the entire string with double
  2274. quote marks.  (These rules are the same as for strings in INPUT
  2275. replies or DATA statements.)
  2276.  
  2277. Badly formed USING string. (8201)
  2278. The format string in your Using$ function or PRINT USING
  2279. statement is incorrect.  One of the format items doesn`t follow
  2280. True BASIC`s rules.
  2281.  
  2282. Badly formed input line. (8105)
  2283. The reply to an INPUT statement (either from a file or from the
  2284. keyboard) is badly formed.  Most lekely you have not properly
  2285. matched up opening and closing quote marks.
  2286.  
  2287. Can`t change that key.
  2288. True BASIC does not let you change the meanings of any of the
  2289. normal, printing characters.
  2290.  
  2291. Can`t continue.
  2292. You`ve just given a CONTINUE command, to resume running a
  2293. suspended program.  However, True BASIC cannot continue the
  2294. program.  There are several possible reasons.  You cannot continue
  2295. a program that you haven`t yet started running, or one which
  2296. you`ve just changed.  You cannot continue a program which stopped
  2297. because an error occured.  And you cannot continue a suspended
  2298. program afeter using a DO command.  If you are trying to debug a
  2299. program which stopped because of an error, try using the BREAK
  2300. command to insert breakpoints before the erroneous line, and then
  2301. run the program again.
  2302.  
  2303. Can`t copy region itself.
  2304. The True BASIC editor does not let you copy a region into itself. 
  2305. For instance, you may not make a copy of some subroutine within
  2306. that subroutine.  If you really want to, you can put a copy of the
  2307. region somewhere else, and then move this copy into the original
  2308. region.
  2309.  
  2310. Can`t do graphics on this computer. (11000)
  2311. Your computer cannot draw graphics.  (Not for Amiga)
  2312.  
  2313. Can`t edit compiled program,
  2314. Your program is compiled, and so cannot be changed.
  2315. Can`t erase file not opened as OUTIN. (7301)
  2316. You may not use the ERASE statement on a file, unless the file
  2317. has been opePLAY music$
  2318.  
  2319. PLOT x1,y1;x2,y2;...
  2320. PLOT AREA:x1,y1;x2,y2;...
  2321. PLOT LINES:x1,y1;x2,y2;...
  2322. PLOT POINTS:x1,y1;x2,y2;...
  2323. PLOT TEXT,AT x1,y1:expr$
  2324.  
  2325. PRINT expr1,expr2,...
  2326. PRINT expr1;expr2;...
  2327. PRINT USING format$:expr1,expr2,...
  2328.  
  2329. PROGRAM name
  2330. PROGRAM name(var$)
  2331.  
  2332. RANDOMIZE
  2333.  
  2334. READ var1,var2,...
  2335. READ #expr:var1,var2,...
  2336. READ #expr,BYTES expr:var1,var2,...
  2337.  
  2338. REM
  2339.  
  2340. RESET
  2341.  
  2342. RESTORE
  2343.  
  2344. RETURN
  2345.  
  2346. SELECT CASE expr            test may be
  2347.     CASE test1,test2,...
  2348.     ...                    constant
  2349.     ...                    low TO high
  2350.     CASE test3,test4,...    IS op constant
  2351.     ...
  2352.     ...                    op can be <,=,<>, etc
  2353.     CASE ELSE
  2354.     ...
  2355.     ...
  2356.     END SELECT
  2357.  
  2358. Set Statements
  2359.  
  2360. BACK expr                #n:MARGIN expr
  2361. COLOR expr            #n:POINTER BEGIN
  2362. COLOR MIX (color) r,g,b    
  2363. CURSOR expr$            #n:POINTER END
  2364. CURSOR line,column        #n:POINTER NEXT
  2365. MARGIN expr            #n:POINTER SAME
  2366. MODE name$            #n:RECORD expr
  2367. WINDOW x1,x2,y1,y2        #n:RECSIZE expr
  2368. ZONEWIDTH expr            #n:ZONEWIDTH expr
  2369. SOUND freq,time
  2370. STOP
  2371.  
  2372. SUB subr(var1,var2,...)
  2373.     ...
  2374.     ...
  2375.     END SUB
  2376.  
  2377. UNSAVE expr$
  2378.  
  2379. WHEN ERROR IN
  2380.     ...
  2381.     ...
  2382.     USE
  2383.     ...
  2384.     ...
  2385.     END WHEN
  2386.  
  2387. WINDOW #expr
  2388.  
  2389. WRITE #expr:expr1,expr2,...
  2390.  
  2391. Formatting characters for PRINT USING statement and Using$
  2392. function
  2393.  
  2394. +    print number with leading "+" or "-"
  2395. -    print number with leading space or "-"
  2396. $    print number with leading dollar sign
  2397. *    print leading zeros as "*"
  2398. %    print leading zeros as "0"
  2399. #    print leading zeros as spaces
  2400. ,    insert comma here if appropriate
  2401. .    align decimal point here
  2402. ^    exponent field
  2403. <    left justify string
  2404. >    right justift string
  2405.  
  2406.  
  2407.  
  2408.  
  2409.  
  2410.  
  2411.  
  2412.  
  2413.  
  2414.  
  2415.  
  2416.  
  2417.  
  2418.  
  2419.  
  2420.  
  2421.  
  2422.  
  2423.  
  2424. ERROR MESSAGES
  2425.  
  2426. Argument types don`t match.
  2427. Your`e calling a routine with some argumanets, but earlier in your
  2428. program you defined or called the same routine with different
  2429. arguments.  Either you`re giving a different number of arguments in
  2430. the calls, or their types are different - you`re passing strings
  2431. instead of numbers, or vice versa.  Check this call against
  2432. preceding calls, and against the routine`s definition.
  2433.  
  2434. Bad FIND item; try using quotes.
  2435. When you`re trying to find a string which contains a comma or
  2436. double quote marks, you must enclose the entire string with double
  2437. quote marks.  (These rules are the same as for strings in INPUT
  2438. replies or DATA statements.)
  2439.  
  2440. Badly formed USING string. (8201)
  2441. The format string in your Using$ function or PRINT USING
  2442. statement is incorrect.  One of the format items doesn`t follow
  2443. True BASIC`s rules.
  2444.  
  2445. Badly formed input line. (8105)
  2446. The reply to an INPUT statement (either from a file or from the
  2447. keyboard) is badly formed.  Most lekely you have not properly
  2448. matched up opening and closing quote marks.
  2449.  
  2450. Can`t change that key.
  2451. True BASIC does not let you change the meanings of any of the
  2452. normal, printing characters.
  2453.  
  2454. Can`t continue.
  2455. You`ve just given a CONTINUE command, to resume running a
  2456. suspended program.  However, True BASIC cannot continue the
  2457. program.  There are several possible reasons.  You cannot continue
  2458. a program that you haven`t yet started running, or one which
  2459. you`ve just changed.  You cannot continue a program which stopped
  2460. because an error occured.  And you cannot continue a suspended
  2461. program afeter using a DO command.  If you are trying to debug a
  2462. program which stopped because of an error, try using the BREAK
  2463. command to insert breakpoints before the erroneous line, and then
  2464. run the program again.
  2465.  
  2466. Can`t copy region itself.
  2467. The True BASIC editor does not let you copy a region into itself. 
  2468. For instance, you may not make uare matrix, since the determinant
  2469. is mathematically defined only for such matrices.
  2470.  
  2471. Disk full. (9006)
  2472. You are writing output to a file, and the disk has become full.
  2473.  
  2474. Diskette removed, or wrong diskette. (9005)
  2475. You had opened a file, but while True BASIC was using it, you
  2476. removed the disk and inserted another one.  Don`t switch disks while they`re in use!
  2477.  
  2478. Division by zero. (3001)
  2479. One of your expressions tried to divide some quantity by zero.  If
  2480. you want to substitute the largest possible number and continue
  2481. (without an error), enclose the expression in a WHEN statement:
  2482.     when error in
  2483.     let x=(1+2+3)/0
  2484.     use
  2485.     let x=Maxnum
  2486.     end when
  2487. Maxnum is a True BASIC function which gives the largest possible
  2488. number available on your computer.
  2489.  
  2490. Doesn`t belong here.
  2491. The cursor points to some word in your program which doesn`t
  2492. make sense.
  2493.  
  2494. Ending doesn`t match beginning.
  2495. You are using a structured statement, such as a FOR-NEXT or IF-
  2496. THEN-ELSE, and the ending statement doesn`t properly match the
  2497. beginning of the structure.  Most likely you have forgotten the
  2498. ending statement for some structure within this one.  Or you may
  2499. have begun a FOR loop using one index variable, but used another
  2500. variable on the NEXT statement.
  2501.  
  2502. Error in PLAY string. (4501)
  2503. The string given in your PLAY statement doesn`t follow True
  2504. BASIC rules.
  2505.  
  2506. Expected "thing"
  2507. The cursor points to a spot where True BASIC expected some word
  2508. or punctuation, but found something else.
  2509.  
  2510. Expected relational operator.
  2511. The cursor points to a spot where you must put a relational
  2512. operator, such as "=" or "<".  (Note that True BASIC does not allow
  2513. statements like "IF a THEN ...", as do some other BASICs.  Change
  2514. such statements to "IF a<>0 THEN...".)
  2515.  
  2516. File already exists. (9004)
  2517. You are trying to create a new file, but it already exists.  Check
  2518. to make sure you have given the correct filename.  If you want to
  2519. overwrite an existing file, change the CREATE NEW in the open
  2520. statement to CREATE NEWOLD.  Or use the REPLACE command
  2521. instead of SAVE.
  2522.  
  2523. File is read or write protected. (9001)
  2524. You are trying to read or write a file but your operating system
  2525. has write or read-protected this file.
  2526.  
  2527. File pointer out of bounds. (7252)
  2528. You are trying to use the RESET or SET POINTER or SET RECORD
  2529. statement to change a file`s pointer.  However the position you`ve given is either less than 1, or past the end of the file.
  2530.  
  2531. File`es record size doesn`t match open OPEN RECSIZE. (7103)
  2532. Each record file has its RECSIZE built into it.  The RECSIZE of
  2533. the file you`re trying to open doesn`t match the RECSIZE given in
  2534. your OPEN statement.
  2535.  
  2536. IDN must make a square matrix. (6004)
  2537. Identity matrices must be square.  Therefore when you use the
  2538. Idn(x,y) function, you must make sure that x=y.
  2539.  
  2540. Illegal array bounds for name in routine
  2541. You`ve defined an array where the upper bound is less than the
  2542. lower bound.
  2543.  
  2544. Illegal channel.
  2545. You`ve written a SET or ASK statement that requires a channel
  2546. number, but doesn`t have one.  Or you`ve added a channel number
  2547. to a SET or ASK statement that doesn`t allow one.
  2548.  
  2549. Illegal data.
  2550. Your DATA statement is not properly written.
  2551.  
  2552. Illegal exit.
  2553. You`ve written an EXIT DO statement outside of any DO-LOOPS,
  2554. or an EXIT-FOR outside of any FOR loop, etc.  Or you have
  2555. written unknown kind of EXIT statement.
  2556.  
  2557. Illegal expression.
  2558. The cursor points somewhere within an expression that doesn`t
  2559. follow True BASIC`s rules.
  2560.  
  2561. Illegal keyword.
  2562. The cursor points to a word that doesn`t make sense in that
  2563. location.
  2564.  
  2565. Illegal number.
  2566. The cursor points to a spot where a number is required, but you`ve
  2567. given something else.
  2568.  
  2569. Illegal option.
  2570. Make sure you`ve spellled ANGLE,BASE,DEGREES,and RADIANS
  2571. properly.
  2572.  
  2573. Illegal parameter.
  2574. You`ve written a SUB, DEF, or PICTURE statement, defining a
  2575. routine.  Something is wrong with one of the paramaters in the
  2576. parameter list.
  2577.  
  2578. Illegal statement.
  2579. Each statement must beging with a True BASIC keyword, such as
  2580. LET or SELECT.
  2581.  
  2582.  
  2583. Improper NUM string. (4020)
  2584. The string you`ve given to the NUM fuction doesn`t represent an
  2585. IEEE 8-byte floating point number.
  2586. Improper ORD string. (4003)
  2587. The Ord function requires either a one-character string, or a string
  2588. giving the official name of an ASCII character.  No leading or
  2589. trailing spaces are allowed.
  2590.  
  2591. Input item bigger then RECSIZE. (8302)
  2592. This message is only given for damaged record files.
  2593.  
  2594. INV needs a square matrix. (6003)
  2595. Matrix inversion is defined only for square matrices.
  2596.  
  2597. LBOUND out of range. (4008)
  2598. You are using a call such as Lbound(A,3) and the array A doesn`t
  2599. have three dimensions.
  2600.  
  2601. LOG of number <=0. (3004)
  2602. Logarithms are only defined for positive numbers.
  2603.  
  2604. MARGIN less than zonewidth. (4006)
  2605. Your SET MARGIN statement is trying to set a margin less then
  2606. the zonewidth.
  2607.  
  2608. Mismatched array sizes. (6001)
  2609. You`re using a MAT statement which requires arrays of the same
  2610. size, but the arrays are different sizes.
  2611.  
  2612. Missing end statement.
  2613. All True BASIC programs must contain END statements.
  2614.  
  2615. MOD and REMAINDER can`t have 0 as 2nd argument. (3006)
  2616. The Mod and Remainder functions do not allow zero as their
  2617. second argument, since this is equivalent to dividing by zero.
  2618.  
  2619. Must be a function name.
  2620. You`ve written a DEF or FUNCTION statement, but no proper
  2621. function name follows the DEF or FUNCTION.
  2622.  
  2623. Must be a number.
  2624. Use a number, not an expression.
  2625.  
  2626. Must be a picture name.
  2627. Your DRAW statement names something other than a picture.
  2628.  
  2629. Must be a string constant.
  2630. Use a constant, not an expression.
  2631.  
  2632. Must be a subroutine name.
  2633. The CALL statement can only be used to call subroutines.
  2634.  
  2635. Must be a variable.
  2636. You`ve used an expression, or a routine name, in a place where only a variable is permitted.
  2637.  
  2638.  
  2639. Must be an array.
  2640. You must give an array variable.
  2641.  
  2642. Must be a byte file for READ BYTES. (7351)
  2643. You`re tring to use a READ BYTES statement on a text or record
  2644. file.
  2645.  
  2646. Must be byte file or empty for SET RECSIZE. (7251)
  2647. SET RECSIZE can only be used or byte files, or on empty record
  2648. files.
  2649.  
  2650. Must be record or byte file for SET RECORD. (7202)
  2651. SET RECORD cannot be used on text files.  You may reset a text
  2652. file`s pointer only to the very beginning or very end of the file.
  2653.  
  2654. Must be record or byte file. (8502)
  2655. You`re using the READ or WRITE statement on a text file, or on a
  2656. window.
  2657.  
  2658. Must be a text file. (8501)
  2659. You`re using an INPUT or PRINT statement on a record file or a
  2660. byte file.
  2661.  
  2662. Must SET RECSIZE before WRITE. (8304)
  2663. You cannot write to an empty record file without somehow first
  2664. indicating the file`s record size.  You may either execute a SET
  2665. RECSIZE statement before the first WRITE statement, or you may
  2666. specify the file`s record size in the OPEN statement.
  2667.  
  2668. Name can`t be redefined.
  2669. You can`t use the same name for two different things.
  2670.  
  2671. Negative number to non-intergral power. (3002)
  2672. You`re trying to compute n^x but n is negative and x is not an
  2673. integer.
  2674.  
  2675. No CASE selected, but no CASE ELSE. (10004)
  2676. You have executed a SELECT CASE statement, but no CASE test
  2677. has succeeded.  Since you didn`t have a CASE ELSE block to catch
  2678. this problem, True BASIC prints this error message.
  2679.  
  2680. No GET MOUSE on this computer. (8700)
  2681. You computer does not support a mouse.  (Not Amiga).
  2682.  
  2683. No main program.
  2684. Your current file contains only functions, pictures, and/or
  2685. subroutines - but no main program.
  2686.  
  2687. No saved copy - still want to compile?
  2688. Compile requester.
  2689.  
  2690. No such color. (11008)
  2691. You`re using the SET COLOR statement with some colour name that
  2692. True BASIC doesn`t recognize.
  2693. No such file. (9003)
  2694. You`re trying to use a file which doesn`t exist.
  2695.  
  2696. No such function or subroutine.
  2697. You`ve named a function, subroutine, or picture in a command, but
  2698. this routine doesn`t exist.
  2699.  
  2700. No such line numbers.
  2701. You`ve given a range of line numbers in a command, but no lines
  2702. have those numbers.
  2703.  
  2704. No USING item for ouput. (8202)
  2705. The format string in your Using$ function or PRINT USING
  2706. statement has no formatting items in it.
  2707.  
  2708. Not found.
  2709. You`ve used the FIND key to find some word or phrase, but it
  2710. wasn`t found.
  2711.  
  2712. ON index out of range, no ELSE given. (10001)
  2713. You`ve used an ON GOTO or ON GOSUB statement, and the number
  2714. on which you`re branching is out of range.
  2715.  
  2716. Out of memory. (5000)
  2717. Out of memory - get more add-on memory!
  2718.  
  2719. Ouput item bigger than RECSIZE. (8301)
  2720. You`re trying to write an item to a record file, but it doesn`t fir
  2721. within the record size established for that file.
  2722.  
  2723. Overflow. (1000)
  2724. You`ve computed a number bigger than the one your computer can
  2725. handle.
  2726.  
  2727. Please say what lines you mean.
  2728. Mark the lines.
  2729.  
  2730. Please try "CHANGE old,new".
  2731. Give both old and new phrases.
  2732.  
  2733. Please try "DO filename".
  2734. You must give a file name when using the DO command.
  2735.  
  2736. Please try "INCLUDE filename".
  2737. You must give a file name when using the INCLUDE command.
  2738.  
  2739. Please try "KEY" or "KEY FROM file" or "KEY TO file".
  2740. You must give a file name.
  2741.  
  2742. Please try "LOCATE item".
  2743. You must give the phrase to be located.
  2744. Please try "OLD filename".
  2745. You must give a file name.
  2746. Please try "SAVE filename" or "REPLACE filename".
  2747. You must give a filename.
  2748.  
  2749. Please try "UNSAVE filename@.
  2750. You must give a filename.
  2751.  
  2752. Please type line numbers as 100 or 100-150.
  2753. True BASIC can`t understand a command such as DELETE with the
  2754. line numbers you have given.
  2755.  
  2756. Program stopped.
  2757. You pressed the STOP key.
  2758.  
  2759. REPEAT$ count <0. (4010)
  2760. You`re using the Repeat$(a$,n) function, but n is less than zero.
  2761.  
  2762. Reading past end of data. (8001)
  2763. You`ve executed a READ statement, but have run out of DATA
  2764. items to read.
  2765.  
  2766. Reading past end of file. (8011)
  2767. You`re trying to read more than exists in the file.
  2768.  
  2769. RETURN without GOSUB. (10002)
  2770. You`ve just executed a RETURN statement, but there has been no
  2771. corresponding GOSUB instruction.
  2772.  
  2773. Screen bounds must be 0 to 1. (11003)
  2774. The bounds given on an OPEN SCREEN statement must lie in the
  2775. range from 0 to 1, inclusive.  No matter how big your screen is,
  2776. the left and bottom edges are defined to be 0; the rifht and top
  2777. edges are defined to be 1.
  2778.  
  2779. Screen minimum >+ maximum. (11002)
  2780. Incorrect OPEN SCREEN values.
  2781.  
  2782. SIZE index out of range. (4004)
  2783. You`re trying to take SIZE(A,3) for instance, when the array A has
  2784. fewer than 3 dimensions.
  2785.  
  2786. SQR of negative number. (3005)
  2787. You are trying to take the square root of a negative number.
  2788.  
  2789. Statement outside of program.
  2790. Statement is outside your main program, but is not included within
  2791. any external routine.
  2792.  
  2793. String given instead of number. (8103)
  2794. You`ve executed an INPUT statement which is trying to input a
  2795. number.  However the reply given isn`t a number.
  2796.  
  2797.  
  2798. String too long. (1051)
  2799. You`ve tried to create a string longer than 1,048,575 characters.
  2800.  
  2801. Subscript out of bounds. (2001)
  2802. You`ve given an array subscript that lies outside the array`s
  2803. bounds.
  2804.  
  2805. TAB column not between 1 and margin. (4005)
  2806. You`ve used the TAB function in a PRINT statement, but its
  2807. argument doesn`t lie between 1 and the current margin.
  2808.  
  2809. The BYE command is just "BYE".
  2810. When you want to leave True BASIC just type BYE.
  2811.  
  2812. This must first appear in a DIM or DECLARE DEF.
  2813. True BASIC doesn`t know if it`s an array or a function.
  2814.  
  2815. Too few input items. (8002)
  2816. You`ve executed an INPUT statement, and the input reply doesn`t
  2817. contain as may items as requested.
  2818.  
  2819. Too many channels open. (7102)
  2820. You have tried to open more than 10 channels.
  2821.  
  2822. Too many input items. (8003)
  2823. You`ve executed an input statement and the input reply line
  2824. contains more items than requested.
  2825.  
  2826. Trouble using disk or printer. (9002)
  2827. Printer or disk problem.
  2828.  
  2829. Type is wrong for name in routine
  2830. You`ve tried calling a routine named routine within another routine
  2831. named routine.  However you got the arguments wrong in this call
  2832. - they don`t match the parameter list.
  2833.  
  2834. UBOUND out of range. (4009)
  2835. You`ve tried calling something like Ubound(a,3), where a is an
  2836. array with less than 3 dimensions.
  2837.  
  2838. Undefined routine name in routine
  2839. The routine named routine has tried to use a function, subroutine,
  2840. or picture called name.  But this is nowhere defined.
  2841.  
  2842. Unknown OPEN option. (7101)
  2843. Option doen`t exist.
  2844.  
  2845. VAL string isn`t a proper number. (4001)
  2846. You`ve called the Val function, but the string you gave doesn`t
  2847. properly represent a number.
  2848. What? (Please type HELP.)
  2849. Unknown command.
  2850.  
  2851.  
  2852. Window minimum=maximum (11001)
  2853. You`ve executed a SET WINDOW statement which sets the vertical
  2854. or horizontal window maximum equal to the minimum.
  2855. Wrong number of arguments.
  2856. You`re calling a function, subroutine, or picture, but specifying the
  2857. wrong number of arguments.
  2858.  
  2859. Wrong number of dimensions.
  2860. You`re trying to use an array, but have given the wrong number of
  2861. dimensions.
  2862.  
  2863. Wrong type.
  2864. You`re tring to use a string where a number is needed, or a
  2865. number where a string is needed.
  2866.  
  2867. Wrong type of file. (7104)
  2868. Wrong type of file for OPEN statement.
  2869.  
  2870. You have two routines called name in routine.
  2871. In the routine named routine, you`ve defined two different routines
  2872. called name.
  2873.  
  2874. Zero to negative power. (3003)
  2875. You`re trying to compute 0^n, where n<0.
  2876.  
  2877. ZONEWIDTH out of range. (4007)
  2878. You`ve executed a SET ZONEWIDTH statement, trying to set the
  2879. zonewidth less than 1, or greater than the margin.
  2880.  
  2881.  
  2882.  
  2883.  
  2884.  
  2885.  
  2886.  
  2887.  
  2888. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  2889.  
  2890.  
  2891.  
  2892.  
  2893.  
  2894. Printed by COL
  2895. 1 March 1988
  2896.  
  2897. HAVE FUN!!!
  2898.  
  2899.